-
Bug
-
Resolution: Done
-
Critical
-
JWS 3.0.1 ER1
-
None
-
Release Notes
-
-
-
-
-
-
Documented as Resolved Issue
There is config variable named CATALINA_PID in /etc/tomcat8/tomcat8.conf with default value:
CATALINA_PID="/var/run/tomcat8.pid"
This configuration file is sourced in /etc/rc.d/init.d/tomcat8 init file but instead of this variable there is used (on quite many places!) manual value
"/var/run/${NAME}.pid"
which might lead into situation that actual pid file might not be placed where configuration itself says.
I propose to fix this by using variable from configuration file. If there might be risk that some user is using very old conf where such variable CATALINA_PID is not set then right after the sourcing of the configuration file in init file there might be something like this:
CATALINA_PID="${CATALINA_PID:-/var/run/${NAME}.pid}"
and further in init script then using this variable...
Another problem is that when I actually modify the default CATALINA_PID value in /etc/tomcat8/tomcat8.conf and try to start tomcat then it says that it has failed because in tomcat start script in /usr/sbin/tomcat8 there is code like this:
if [ ! -z "$CATALINA_PID" ]; then echo $! > $CATALINA_PID fi
which attempts to write PID into CATALINA_PID. Althought with current implementation this file does not exist and command fails. This return code is then propagated back into init script itself.
Same problem also affects tomcat7 init file.
- relates to
-
JWS-666 [RHEL 7 RPM] TOMCAT_USER variable ignored
- Closed