https://bz.apache.org/bugzilla/show_bug.cgi?id=65970
--- Comment #5 from Christopher Schultz <ch...@christopherschultz.net> --- (In reply to eddie.wu from comment #3) > exactly I am talking about the case of power failure or kill-9 signal. > basically in such scenario, current scrip code will treat the stale PID > (which is generated before VM reboot) as current running tomcat process and > hence refuse to start Tomcat. This is only true if the PID file contains the PID of a currently-running process. If you stop Tomcat, start it again, then do a kill -9 on the process and try to restart it, I suspect you'll see a message in the logs about clearing-away a (truly) stale PID file. On startup, however, there are many processes with small PIDs which may coincidentally overlap with the one in the PID file. > My expectation is that Tomcat script to ignore this stale PID and go ahead > to startup. And I propose to compare the time stamp of $CATALINA_PID file > and the time when reboot happened to judge whether it is a STALE PID. File timestamps can be misleading or wrong. I would prefer better interrogation of the PID which is currently running to see if it seems likely to be an actual Tomcat process. For example, if the command-line string for that process includes catalina.base=${CATALINA_BASE} then it's the correct one. If it doesn't contain that string, then it's very unlikely to be an actual Tomcat launched using this same technique (i.e. bin/catalina.sh). -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org