https://bz.apache.org/bugzilla/show_bug.cgi?id=57801

            Bug ID: 57801
           Summary: Tomcat catalina.sh fails to start  after machine is
                    reboot because there is another process have the same
                    PID as Tomcat before reboot
           Product: Tomcat 8
           Version: 8.0.21
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: jia...@gmail.com

We have set CATALINA_PID in setenv.sh.

After the machine is reboot, The PID file is still there and tomcat fails to
start. 

The error message is: 
"Existing PID file found during start.
Tomcat appears to still be running with PID 3387. Start aborted."

After checking, there is another process have the same PID: 3387.

After checking the code catalina.sh, the following logic has issue:


  if [ ! -z "$CATALINA_PID" ]; then
    if [ -f "$CATALINA_PID" ]; then
      if [ -s "$CATALINA_PID" ]; then
        echo "Existing PID file found during start."
        if [ -r "$CATALINA_PID" ]; then
          PID=`cat "$CATALINA_PID"`
          ps -p $PID >/dev/null 2>&1
          if [ $? -eq 0 ] ; then
            echo "Tomcat appears to still be running with PID $PID. Start
aborted."
            exit 1
          else


Tomcat should not treat tomcat is still alive.
The script should work anyway.

-- 
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

Reply via email to