Tomcat 9 startup at server start

Q&A regarding installation and issues getting started with Servoy

Tomcat 9 startup at server start

Postby huber » Tue Oct 08, 2019 9:57 am

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"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.apache.tomcat</string>
<key>ServiceDescription</key>
<string>Tomcat</string>
<key>UserName</key>
<string>root</string>
<key>GroupName</key>
<string>wheel</string>
<key>EnvironmentVariables</key>
<dict>
<key>CATALINA_HOME</key>
<string>/Library/Tomcat</string>
<key>JAVA_HOME</key>
<string>/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home</string>
</dict>
<key>ProgramArguments</key>
<array>
<string>/Library/Tomcat/bin/startup.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>


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,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 531
Joined: Mon May 14, 2012 11:31 pm

Re: Tomcat 9 startup at server start

Postby huber » Fri Oct 11, 2019 9:18 am

Tomcat 9 - anyone?
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 531
Joined: Mon May 14, 2012 11:31 pm

Re: Tomcat 9 startup at server start

Postby mboegem » Fri Oct 11, 2019 2:30 pm

Hi Robert,

have a look here, it might help you: https://superuser.com/questions/130802/how-to-re
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1797
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Tomcat 9 startup at server start

Postby huber » Tue Oct 15, 2019 9:09 am

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 wrote:Hi Robert,

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


Regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 531
Joined: Mon May 14, 2012 11:31 pm


Return to I'm just getting started

Who is online

Users browsing this forum: No registered users and 1 guest