tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Deleris <dominique.dele...@bluewin.ch>
Subject Tomcat4 on Debian Woody : "/etc/init.d/tomcat4 stop" won't unload apps properly
Date Thu, 01 Aug 2002 09:16:22 GMT
Hello,

I use tomcat + apache on a debian box (woody):
apache          1.3.26
j2sdk1.3        1.3.1
tomcat4         4.0.4

I have noticed the following problem in /etc/init.d/tomcat4: when
called with the "stop" argument, it will kill the JVM before the
shutdown of tomcat is correctly ended.

This means that tomcat applications will not be ended correctly:
for instance servlets destroy() methods are not called.

  stop)
	echo -n "Stopping $DESC: "
        if start-stop-daemon --test --start --pidfile "$PIDFILE" \
                --user $TOMCAT4_USER --startas "$JAVA_HOME/bin/java" \
		>/dev/null; then
		echo "(not running)."
	else
		su -p $TOMCAT4_USER -c "\"$DAEMON\" stop" \
			>/dev/null 2>&1 || true
		# Fallback to kill the JVM process in case stopping didn't work
		sleep 2
HERE	>>>	# DOD 31.07.2002 : JVM must not be killed before the tomcat apps are unloaded
properly
HERE	>>>	#start-stop-daemon --stop --oknodo --quiet \
HERE	>>>	#	--pidfile "$PIDFILE" --user "$TOMCAT4_USER"
		rm -f "$PIDFILE"
		echo "$NAME."
	fi
	;;

Is there a way to keep the "fallback to kill JVM in case of
problem", but allowing tomcat to stop correctly. I also could
modify the sleep instruction to wait 30s, but...

Should I report a bug to the package maintainer?

Thanks for any help.

Cheers,
-- 
Dominique Deleris
http://potatoworld.tuxfamily.org


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message