Re: strange shut down problem
i have the same problem (found out yesterday). it might be specific to/when running with IBM JDK (don't know). what i did so far was [tim-mn@spiderman src]$ ps -efd|grep tomcat.home find the %JAVA_HOME%/bin/java -Dtomcat.home ... process with PPID = 1 (the mother of devil's spawn) and KILL IT!!! [tim-mn@spiderman src]$ kill 6203 # e.g. gurus do this in one line. as i said: found out about 9 hours ago slept since ;) Cindy Ballreich wrote: I've got Tomcat 4.0.3 on Redhat 7.1 and when I start it I get the usual batch of 20-50 threads. When I shut tomcat down (using shutdown.sh) there are about a dozen threads that don't go away. Tomcat is definately not running (at least it's not accepting requests), but the threads are still there. I'm not seeing any errors, but I'm not sure where to look. I've done some web searches of the archives and haven't found anything, but I'm hoping that someone will recognize this problem and point me in the right direction. Thanks!! 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]
Re: strange shut down problem
and a guru told me to [tim-mn@spiderman src]$ ps -Af|awk '{ if ($3 == 1) { print ; } }' |grep $JAVA_HOME|awk '{ print $2}' you probably could backtick the whole line and issue kill on it, provided you don't have any conflicting java stuff going on that gets killed in the process. Mats Nyberg wrote: i have the same problem (found out yesterday). it might be specific to/when running with IBM JDK (don't know). what i did so far was [tim-mn@spiderman src]$ ps -efd|grep tomcat.home find the %JAVA_HOME%/bin/java -Dtomcat.home ... process with PPID = 1 (the mother of devil's spawn) and KILL IT!!! [tim-mn@spiderman src]$ kill 6203 # e.g. gurus do this in one line. as i said: found out about 9 hours ago slept since ;) Cindy Ballreich wrote: I've got Tomcat 4.0.3 on Redhat 7.1 and when I start it I get the usual batch of 20-50 threads. When I shut tomcat down (using shutdown.sh) there are about a dozen threads that don't go away. Tomcat is definately not running (at least it's not accepting requests), but the threads are still there. I'm not seeing any errors, but I'm not sure where to look. I've done some web searches of the archives and haven't found anything, but I'm hoping that someone will recognize this problem and point me in the right direction. Thanks!! 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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]
RE: strange shut down problem - solution?
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]
Re: strange shut down problem
this might get you started... run the following commands and send your output: netstat -a lsof | grep java although that second one might have a lot of outputin which case look over that to see which files, devices, and ports the JVM has open. fillup On 5/21/02 4:58 PM, Cindy Ballreich [EMAIL PROTECTED] wrote: I've got Tomcat 4.0.3 on Redhat 7.1 and when I start it I get the usual batch of 20-50 threads. When I shut tomcat down (using shutdown.sh) there are about a dozen threads that don't go away. Tomcat is definately not running (at least it's not accepting requests), but the threads are still there. I'm not seeing any errors, but I'm not sure where to look. I've done some web searches of the archives and haven't found anything, but I'm hoping that someone will recognize this problem and point me in the right direction. Thanks!! 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]
RE: strange shut down problem
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 Subir -Original Message- From: Phillip Morelock [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 5:16 PM To: Tomcat Users List Subject: Re: strange shut down problem this might get you started... run the following commands and send your output: netstat -a lsof | grep java although that second one might have a lot of outputin which case look over that to see which files, devices, and ports the JVM has open. fillup On 5/21/02 4:58 PM, Cindy Ballreich [EMAIL PROTECTED] wrote: I've got Tomcat 4.0.3 on Redhat 7.1 and when I start it I get the usual batch of 20-50 threads. When I shut tomcat down (using shutdown.sh) there are about a dozen threads that don't go away. Tomcat is definately not running (at least it's not accepting requests), but the threads are still there. I'm not seeing any errors, but I'm not sure where to look. I've done some web searches of the archives and haven't found anything, but I'm hoping that someone will recognize this problem and point me in the right direction. Thanks!! 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]