https://bz.apache.org/bugzilla/show_bug.cgi?id=65970
Bug ID: 65970
Summary: Tomcat cannot startup due to Stale PID
Product: Tomcat 8
Version: 8.5.77
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ----
Here is the scenario when we encountered this issue.
After rebooting the VM, stale PID file are kept and prevent the tomcat service
from starting up.
error log:
Existing PID file found during start.
Tomcat appears to still be running with PID 554. Start abort
If the following process is not a Tomcat process, remove t
UID PID PPID C STIME TTY TIME CMD
root 554 2 0 01:31 ? 00:00:00 [kworker/0
root cause:
after reboot, tomcat process disappeared, but its PID are kept.
and same PID happen to be used by other process after reboot.
refer to Bug 57801, and catalina.sh
I am wondering whether it is possible to check the timestamp of $CATALINA_PID
file right before line of script.
PID=`cat "$CATALINA_PID"
and ignore it if CATALINA_PID timestamp is older than the time when reboot
happened.
I am not expert of scripting or cross platform, not sure whether there is a
safe way to implement this logic on all platform.
Please enhance the logic here if it is feasible.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]