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-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>>
> 

Attachment: 0x62590808.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to