https://issues.apache.org/bugzilla/show_bug.cgi?id=52238

             Bug #: 52238
           Summary: Tomcat catalina exit code 1
           Product: Tomcat 6
           Version: 6.0.26
          Platform: HP
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: mmo...@yahoo.co.uk
    Classification: Unclassified


We have installed Tomcat 6.0.26 on a linux server and we have created 2
instances of tomcat on 2 servers.  We also have initialised the CATALINA_PID
and thats been stored in a file on /tmp.  We were testing this on server1 which
is controlled by a cluster software.
On server 1 and 2 normal shut downs and startups are fine .
But if we kill a tomcat instance on server1 for failover test , the cleanup
script for the cluster which calls the tomcat shutdown.sh gives an exit status
of 1.
Since an exit status of 1 is received the cluster software clean up script
fails. 
Every minute it tries for clean up and it fails due to this and so cannot
failover to server2 . I understand that this is a test where the process is
killed but would like to know if I could change the exit 1 to exit 0 and what
are the implications of this
This is on the line in catalina.sh script  where we have the message
PID file ($CATALINA_PID) found but no matching process was found. Stop
aborted."
===========================================================
if [ ! -z "$CATALINA_PID" ]; then
    if [ -f "$CATALINA_PID" ]; then
      kill -0 `cat $CATALINA_PID` >/dev/null 2>&1
      if [ $? -eq 1 ]; then
        echo "PID file ($CATALINA_PID) found but no matching process was found.
Stop aborted."
        exit 1
      fi
    else
      echo "\$CATALINA_PID was set ($CATALINA_PID) but the specified file does
not exist. Is Tomcat running? Stop aborted."
      exit 1
    fi
  fi


=======================================================
Instead of the exit 1 above, can we replace it with rm $PID;exit 0. 
This condition was not there in 5.x release.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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