This is definitely what is happening on my system, which is similar to yours (Tomcat 4.0.3 on a linux box). The problem seems to be with Tomcat starting non Daemon threads in the WebappLoader and StandardLoader. You could fix that yourself and recompile and that may fix it. I'm going to try this when I have some time. Of course, make sure that your app doesn't start non Daemon threads.
The other options are to kill the threads like Mats' suggestion (kludgey, but it works). A simple 'killall java' works too. You could also implement a LifecycleListener that has a System.exit(0) statement as the last line in the stop method. Subir -----Original Message----- From: Cindy Ballreich [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 9:01 AM To: Tomcat Users List Subject: RE: strange shut down problem - solution? At 05:45 PM 5/21/02 -0700, Subir Sengupta wrote: >This is a documented bug. Apparently if there is a non Daemon thread >running Tomcat won't shut down cleanly. > >http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8700 > Hmmm. That sure sounds like what's happening on my system. I guess catalina.sh is called as daemon in the init.d script, but it's not starting the threads as deamon. Is this what's happening? At 10:13 AM 5/22/02 +0200, Mats Nyberg wrote: >and a guru told me to > > [tim-mn@spiderman src]$ ps -Af|awk '{ if ($3 == "1") { print ; } }' >|grep $JAVA_HOME|awk '{ print $2}' This is basically the "solution" that I used. I added this line to the start section of my init.d script... ps -Af | awk '{ if ($3 == "1") { print ; } }' | grep tomcat | awk '{ print $2}' > /var/run/tomcat4.pid And these lines to the stop section... if [ -s /var/run/tomcat4.pid ] ; then PID=`cat /var/run/tomcat4.pid` kill $PID fi This works, but it seems like a horrible kludge to me. Does anyone have any better solutions? Cindy -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
