Tomcat6 + CentOS 3/4/5"tomcat dead but subsys locked"
BUT - Tomcat is NOT dead - Tomcat is fine. The status function just can't find the pid. When I set the CATALINA_PID variable to "/var/run/tomcat.pid" in catalina.sh, it stores the pid, but the status script just checks if the pid in pid file is a string, then reports this error if it is ! How can I make the status script recognize when tomcat is actually running?
We're running tomcat6 on CentOS 3, 4, and 5. Thanks! |
Quote:
How are you starting and stopping Tomcat? I'd suggest stopping it totally...kill ALL threads and other things associated with it, then delete that tomcat.pid file. Start Tomcat up using the startup script, which should write the new PID into that file...status function should then be able to find it, since the PID will be valid. |
I was using service start/stop tomcat
The catalina.sh was NOT writing the pid to the tomcat.pid file - I had to add the CATALINA_PID=/var/run/tomcat.pid variable to make it do that... but the behavior is the same EXCEPT on two CentOS 5 systems - the 3 and 4 systems still say tomcat is dead, yet the tomcat is still running and users can connect to it. It does only look at the existence of the pid, it doesn't try to do anything with it - the test is merely [ -n $pid ]: Code:
# First try "pidof" |
OK, it seems that the pidof program is failing to see the process, because it's looking for something named "tomcat" when it's actually named "java". I edited the /etc/init.d/functions script to get the pid correctly, and the /opt/tomcat6/bin/catalina.sh script to write the PID, and to check if tomcat is already running before starting another process.
|
All times are GMT -5. The time now is 10:48 AM. |