1

I have a very simple task to accomplish: to start tomcat application server on latest MacOS as a daemon. I have performed following steps:

  1. Installed Tomcat in /Library/Tomcat/Home
  2. Validated that it runs fine by executed /Library/Tomcat/Home/bin/startup.sh
  3. Added org.apache.tomcat.plist file to /Library/LaunchDaemons as found on internet (http://blog.i18n.ro/complete-guide-for-installing-hudson-ci-on-os-x-10-6/)
  4. Instructed MacOS to load a daemon description via sudo launchctl load org.apache.tomcat.plist. It succeeded (issuing this command second time outputs "already loaded").
  5. Instructed MacOS to start a daeon via sudo launchctl start org.apache.tomcat.plist

At this point MacOS shows an error "launchctl start error: No such process". I have checked the logfile for launchd - it have no record for this error. Google says nothing. And from error text i can't figure out what is the "process" and why it is "wrong" :(. Any hints what i'm doing wrong?

grigoryvp
  • 3,655
  • 11
  • 39
  • 59

2 Answers2

2

Where was an error in my setup. The correct start command is sudo launchctl start org.apache.tomcat

grigoryvp
  • 3,655
  • 11
  • 39
  • 59
1

Make sure you do

launchctl load -w /Library/LaunchDaemons/org.apache.tomcat.plist

or it won't automatically start on reboot.

eric sorenson
  • 971
  • 8
  • 10