Tomcat 9 startup at server start

I try to automatically startup Tomcat 9 (9.0.26) with LaunchDaemon on macOS Mojave. My LaunchDaemon “org.apache.tomcat.plist” property list file looks like as follows:

<?xml version="1.0" encoding="UTF-8"?> Disabled Label org.apache.tomcat ServiceDescription Tomcat UserName root GroupName wheel EnvironmentVariables CATALINA_HOME /Library/Tomcat JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home ProgramArguments /Library/Tomcat/bin/startup.sh RunAtLoad KeepAlive

The file is placed in /Library/LaunchDaemons folder and has root:wheel as owner:group settings (tried also with admin:wheel, admin:staff etc. with no success).

Unfortunately, Tomcat won’t startup. I have not problem starting and stopping Tomcat in a Terminal with following commands (where “Tomcat” is a sym link to the tomcat installation)

/Library/Tomcat/bin/startup.sh

/Library/Tomcat/bin/catalina.sh stop

So manually sorting and stopping works well. This is also true when using a Mac utility called Tomcat Controller.

Anyone having a property list for Tomcat 9 which works and is willing to share?

Regards,

Tomcat 9 - anyone?

Hi Robert,

have a look here, it might help you: https://superuser.com/questions/130802/how-to-re

Hi Marc

Thanks for your link. I tried many of the hints described there but with no luck. Strange thing is that manually starting the startup.sh script is no problem, as well as stopping. But I don’t get it to run with LaunchDaemon and loading it into Launchctl list. Tried also all sorts of owner:group combination, as it seemed to me it could have to do with bad ownership. But also without luck. I have been run out of ideas where the problem could be, therefor anyone who is able to start the java process with the LaunchDaemon would be helpful to know.

mboegem:
Hi Robert,

have a look here, it might help you: https://superuser.com/questions/130802/how-to-re

Regards,