Pid File Exists, But Process Is Not Running

Tomcat servlet engine is not running, but pid file exists. What does this message mean? Do I need to recover Tomcat if I get it?

Here's the definition of PID. A PID file is a file that contains a process identifier. If Tomcat's startup scripts are run with CATALINA_PID environment variable set properly, then the PID of the Tomcat process will be recorded to a file upon startup. If the file exists when you try to start Tomcat, the scripts will refuse to run because it does not want to clobber a (possibly valid) PID file.

If you are sure that Tomcat is not running, simply delete the file (it should be available through the CATALINA_PID environment variable) and try again.

I share @jordanm's comment about using exit codes instead of checking for specific (text) output: the latest version of Tomcat does not even use the messages that you have shown above, so it's very fragile.

If you want a self-re-starting service, considering looking at jsvc, which actually ships with Tomcat binaries in source form.

service-name dead but pid file exists

have you tried :

kill -9 pid
ps -eaf|grep pid

If pid gone now, try :
service service-name restart
(stop will fail, but should success when starting)

Pidfile exists, but process is dead

I got it to work by doing:

$ sudo kill -9 <app-pid>
$ node app start

Jenkins dead but pid file exists

Change JENKINS_AJP_PORT="8009" (OR whatever value) to JENKINS_AJP_PORT="-1"

It will work for sure.



Related Topics



Leave a reply



Submit