-
Suggestion
-
Resolution: Fixed
-
None
-
None
Bundled Tomcat misses a default value for the CATALINA_PID variable, hence Tomcat doesn't create a pid file which makes it hard for systemd startup scripts to recognize if the Tomcat instance has started up (and respectivele systemd can't tell if Tomcat is still running or was shut down correctly).
Attached is an example code snipped that can be added to apache-tomcat/bin/setenv.sh to make it work:
# set the location of the pid file if [ -z "$CATALINA_PID" ] ; then if [ -n "$CATALINA_BASE" ] ; then CATALINA_PID="$CATALINA_BASE"/work/catalina.pid elif [ -n "$CATALINA_HOME" ] ; then CATALINA_PID="$CATALINA_HOME"/work/catalina.pid fi fi export CATALINA_PID