Hi, When i start tomcat6 two times without a stop in between, rctomcat6 status results into dead state.
I checked the rctomcat6 start script, in this case when the tomcat6 is already running and a rctomcat6 start is done, it display a msg that " process already running", but it continues in the start function further down & executes the TOMCAT_SCRIPT(dtomcat6) script with the start argument. And after that pid in the tomcat6.pid file gets changed but the process keeps running with the old pid, and hence when we do a rctomcat6 status, it results into dead state(bcoz it doesn't find any process running with that pid). I think it shouldn't execute the TOMCAT_SCRIPT in this case, so in case when checkpid is success(in start function), i put an exit after the echo msg " process already running", this solves the problem, but is this the correct solution ? If you think its not the right solution, plz suggest me something appropriate. function start() { echo -n "Starting Tomcat ($CATALINA_BASE)" if [ -f "/var/lock/subsys/${NAME}" ] ; then if [ -f "/var/run/${NAME}.pid" ]; then read kpid < /var/run/${NAME}.pid if checkpid $kpid 2>&1; then echo "$NAME process already running" rc_failed 0 #The below exit i have added exit else echo -n "lock file found but no process running for pid $kpid, continuing" rc_failed 7 fi fi fi ......................... ......................... regards rahul