tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: java thread open after Tomcat shutting down
Date Tue, 07 Dec 2010 10:28:09 GMT
On 12/7/10 10:13 AM, pix_siro wrote:
> 
> I solved writing a simple script to shutting down tomacat and kill the java
> process:
> 
> # stop tomcat
> su - primelife -c "/usr/local/apache-tomcat-7.0.4/bin; ./shutdown.sh
>> /dev/null 2>&1"
> 
> # give application 5 seconds to stop itself
> sleep 2
> 
> # if application is still running kill it anyway
> app_pid=$(ps axuw | grep -v grep | grep "/usr/local/apache-tomcat-7.0.4/bin"
> | awk '{print $2}')
> [[ "x${app_pid}x" == "xx" ]] || kill -9 ${app_pid} >/dev/null 2>&1
> 
> Thanks.

You've treated the symptom.  What was the actual problem?

If you stop an application, or Tomcat and the catalina.out logfile
contains warnings about threads still running, you'll have an idea of
what's wrong.  (Which is why we asked for more information.)

Alternatively, ignore the problem and any other side-effects it might have.


p


> markt-2 wrote:
>>
>> On 03/12/2010 18:36, pix_siro wrote:
>>>
>>> Hi all,
>>> I'm working on Ubuntu 9.10, I have implemented a Java application and I
>>> have
>>> installed it on Tomcat 7.0.4 with a WAR file. When I shut down Tomcat
>>> with
>>> the command ./shutdown.sh, a java thread remains open. Notice that
>>> application have a connection with a postgres db but the connections are
>>> correctly closed. Someone know why?
>>> With the command ps ax | grep java I have the thread's specifications:
>>
>> That is the process, not the specific Java thread. Take a thread dump to
>> see what threads are still running. You want the non-daemon one.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
> 


Mime
View raw message