Re: Tomcat shutdown problem due to running threads.

2009-06-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carsten,

On 6/17/2009 2:04 PM, CBy wrote:
> Thank you, Christopher. It appears that I now have to ways to solve my
> problem. Calling shutdown() stops the threads orderly, so I think I'll
> opt for the ContextListener, although I am not 100% sure.

I'd do both if I were you :)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAko5ODwACgkQ9CaO5/Lv0PCYUgCgpSkcuXg2rFBlfNv+8It9GH34
eB0AoJwUVU7PdQ8dcejZX+FmtupmnwNP
=H87P
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat shutdown problem due to running threads.

2009-06-17 Thread CBy
Thank you, Christopher. It appears that I now have to ways to solve my 
problem. Calling shutdown() stops the threads orderly, so I think I'll 
opt for the ContextListener, although I am not 100% sure.


Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carsten,

On 6/17/2009 4:33 AM, CBy wrote:
  

O'Reilly's Tomcat The Definitive Guide advises me to invoke the
setDaemon(true) method on any Thread object a web application creates to
keep them from hanging the JVM when Tomcat shuts down. My web service,
however, uses a thread pool that is created via
java.util.concurrent.Executors.newFixedThreadPool(NTHREADS) and I don't
know how to make them daemon threads in this case.



Can you adjust that code? If so, use the form of that method that takes
a ThreadFactory object. Something like this ought to do it:

public class DaemonThreadFactory
implements ThreadFactory
{
   public Thread newThread(Runnable r)
   {
  Thread t = new Thread(r);
  t.setDaemon(true);

  return t;
   }
}

  

My new plan was to register a shutdown hook with the JVM in my web
service and to invoke shutdown() or shutdownNow() on the ExecutorService
in it (the method above returns an ExecutorService). Unfortunately, this
does not seem to work.



You should do as André suggests and use a ServletContextListener. You
should probably use the same listener to both create and teardown the
thread pool.

I recently had my first experience with Executors in Java. I have to say
that I love 'em. So simple, yet so powerful.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAko5KyoACgkQ9CaO5/Lv0PDgcQCfVTfVdv3xUXsEFhh+PYWy9uII
hpoAn37qoHfLeSVot+FjaYI3XS+8deeH
=j4WL
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat shutdown problem due to running threads.

2009-06-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carsten,

On 6/17/2009 4:33 AM, CBy wrote:
> O'Reilly's Tomcat The Definitive Guide advises me to invoke the
> setDaemon(true) method on any Thread object a web application creates to
> keep them from hanging the JVM when Tomcat shuts down. My web service,
> however, uses a thread pool that is created via
> java.util.concurrent.Executors.newFixedThreadPool(NTHREADS) and I don't
> know how to make them daemon threads in this case.

Can you adjust that code? If so, use the form of that method that takes
a ThreadFactory object. Something like this ought to do it:

public class DaemonThreadFactory
implements ThreadFactory
{
   public Thread newThread(Runnable r)
   {
  Thread t = new Thread(r);
  t.setDaemon(true);

  return t;
   }
}

> My new plan was to register a shutdown hook with the JVM in my web
> service and to invoke shutdown() or shutdownNow() on the ExecutorService
> in it (the method above returns an ExecutorService). Unfortunately, this
> does not seem to work.

You should do as André suggests and use a ServletContextListener. You
should probably use the same listener to both create and teardown the
thread pool.

I recently had my first experience with Executors in Java. I have to say
that I love 'em. So simple, yet so powerful.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAko5KyoACgkQ9CaO5/Lv0PDgcQCfVTfVdv3xUXsEFhh+PYWy9uII
hpoAn37qoHfLeSVot+FjaYI3XS+8deeH
=j4WL
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat shutdown problem due to running threads.

2009-06-17 Thread André Warnier

CBy wrote:
Thanks for pointing me in the right direction André. A 
ServletContextListener fixed my problem.


My own contribution was minimal, and due mainly to the fact that I am 
eavesdropping on the real Tomcat experts conversations here and 
remembering some things, even if I never used them myself and would not 
recognise one if it appeared in some code.
Fortunately, a Listener is a Tomcat "thing" that has a pretty expressive 
name, and it seemed to fit your request.

Don't ask me how it works though..
;-)

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat shutdown problem due to running threads.

2009-06-17 Thread CBy
Thanks for pointing me in the right direction André. A 
ServletContextListener fixed my problem.



André Warnier wrote:

CBy wrote:
O'Reilly's Tomcat The Definitive Guide advises me to invoke the 
setDaemon(true) method on any Thread object a web application creates 
to keep them from hanging the JVM when Tomcat shuts down. My web 
service, however, uses a thread pool that is created via 
java.util.concurrent.Executors.newFixedThreadPool(NTHREADS) and I 
don't know how to make them daemon threads in this case.


My new plan was to register a shutdown hook with the JVM in my web 
service and to invoke shutdown() or shutdownNow() on the 
ExecutorService in it (the method above returns an ExecutorService). 
Unfortunately, this does not seem to work.


Is there another way to be notified when Tomcat shuts down, so I can 
shutdown the thread pool accordingly?



From a non-expert (but the expterts are mostly asleep right now) :
maybe this ?
http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat shutdown problem due to running threads.

2009-06-17 Thread André Warnier

CBy wrote:
O'Reilly's Tomcat The Definitive Guide advises me to invoke the 
setDaemon(true) method on any Thread object a web application creates to 
keep them from hanging the JVM when Tomcat shuts down. My web service, 
however, uses a thread pool that is created via 
java.util.concurrent.Executors.newFixedThreadPool(NTHREADS) and I don't 
know how to make them daemon threads in this case.


My new plan was to register a shutdown hook with the JVM in my web 
service and to invoke shutdown() or shutdownNow() on the ExecutorService 
in it (the method above returns an ExecutorService). Unfortunately, this 
does not seem to work.


Is there another way to be notified when Tomcat shuts down, so I can 
shutdown the thread pool accordingly?



From a non-expert (but the expterts are mostly asleep right now) :
maybe this ?
http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat shutdown problem

2009-04-28 Thread Pid
S Arvind wrote:
> Pid thanks very much. We found the thread from the thread dump. Problem we
> did is we didnt shutdown the quartz scheduler. Now as per ur guidelines in
> the context listener we did that. It currently in testing phase. Thanks..

Good news.  And now you know 2 things: how to diagnose via Thread dumps,
and it only takes one of 200 devs to forget to stop a Thread...

It's possible that the old way you were stopping TC5.x was just killing
the process - so you weren't seeing the error, perhaps if you were using
JSVC via an init script in /etc/init.d/tomcat5 or something.


p


> "Many of lifes failure are people who did not realize how close they were to
> success when they gave up."
> -Thomas Edison
> 
> 
> On Mon, Apr 27, 2009 at 7:50 PM, Pid  wrote:
> 
>> S Arvind wrote:
>>> Pid very thanks for guiding me ..  one more help alone... can u please
>> tell
>>> me how to check which thread it is runnin by quartz other then checking
>> code
>>> ... i am centos, jvm 5, tomcat 5 and tomcat 6..  i think i am disturbin u
>>> lot, but   ...
>> As Dan said, "kill -QUIT ", and as I said previously, familiarise
>> yourself with jstack, jmap and possibly jconsole, all of which are
>> command line tools available with the Sun JREs.
>>
>> p
>>
>>
>>> -Arvind S
>>>
>>> *
>>> "Many of lifes failure are people who did not realize how close they were
>> to
>>> success when they gave up."
>>> -Thomas Edison*
>>>
>>>
>>> On Mon, Apr 27, 2009 at 7:18 PM, Pid  wrote:
>>>
 S Arvind wrote:
> Is the application completely unchanged for deployment on Tomcat 6?
>>> yes it is completely *unchanged*... is anything must be changed for
> quartz?
 okay, then your best bet is to explore what the JVM is doing after
 shutdown and check which threads are still running.

 p



> --Arvind S
>
> *
> "Many of lifes failure are people who did not realize how close they
>> were
 to
> success when they gave up."
> -Thomas Edison
> *
>
> On Sat, Apr 25, 2009 at 5:06 PM, Pid  wrote:
>
>> Please do not keep using "reply to all".  It is annoying and
>> unnecessary.  I will obviously receive a copy of the mail if you just
>> send a reply to the list.
>>
>>> Did you write your application?
> there are team of 200 Engineers wrote that application so i dont
>> know
>>> where the problem is
>>> Are you using Quartz in your application?
> yeah we have quartz scheduler in our application. But when we run
>> in
>>> Tomcat 5 we dont have this kind of problem
>> Is the application completely unchanged for deployment on Tomcat 6?
>>
>> When you shutdown, Quartz will log a message describing the number of
>> running threads, this may help diagnose the problem.  The count may be
>> above 20, but that isn't necessarily a bad thing.
>>
>>
>>> Are you starting new Threads in your app?
> Might be, i have to ask each team.
>> Check that they are being properly terminated.  Even if the devs
>> promise
>> they are, double check.
>>
>>> When you have started and stopped the application a few times are
>> there
>>> still multiple java processes running?
> YES, this is the only thing assigned to me to correct it.
>> You should ensure that the old processes are terminated before
>> starting
>> new ones, as an old one may hang onto one of the ports that Tomcat
>> uses,
>> thus preventing new instances from starting up.
>>
>> The Linux "kill" command can do this.
>>
>>
>> However...
>>
>> After shutdown has been requested and while the process is still
>> running, take a thread dump, or use the java tools to examine the
>> state
>> of the JVM.  See if you can spot which Threads are still running.
>>
>> Try jmap, jstack and jconsole (if you're on a local machine).
>>
>>
>> p
>>
>>
>>
>>
>>> *"Many of lifes failure are people who did not realize how close they
>> were
>>> to success when they gave up."
>>> -Thomas Edison
>>> *
>>>
>>> On Sat, Apr 25, 2009 at 2:21 PM, Pid  wrote:
>>>
 S Arvind wrote:
> Thanks pid...
>
> Can u able to give me more idea to solve it if possible..
 Did you write your application?

 Are you using Quartz in your application?

 Are you starting new Threads in your app?

 When you have started and stopped the application a few times are
 there
 still multiple java processes running?


 p


> Thanks,
> Arvind S
>
>
> *"Many of lifes failure are people who did not realize how close
>> they
 were
> to success when they gave up."
> -Thomas Edison
> *
>
> On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
>

Re: tomcat shutdown problem

2009-04-28 Thread S Arvind
Pid thanks very much. We found the thread from the thread dump. Problem we
did is we didnt shutdown the quartz scheduler. Now as per ur guidelines in
the context listener we did that. It currently in testing phase. Thanks..




"Many of lifes failure are people who did not realize how close they were to
success when they gave up."
-Thomas Edison


On Mon, Apr 27, 2009 at 7:50 PM, Pid  wrote:

> S Arvind wrote:
> > Pid very thanks for guiding me ..  one more help alone... can u please
> tell
> > me how to check which thread it is runnin by quartz other then checking
> code
> > ... i am centos, jvm 5, tomcat 5 and tomcat 6..  i think i am disturbin u
> > lot, but   ...
>
> As Dan said, "kill -QUIT ", and as I said previously, familiarise
> yourself with jstack, jmap and possibly jconsole, all of which are
> command line tools available with the Sun JREs.
>
> p
>
>
> > -Arvind S
> >
> > *
> > "Many of lifes failure are people who did not realize how close they were
> to
> > success when they gave up."
> > -Thomas Edison*
> >
> >
> > On Mon, Apr 27, 2009 at 7:18 PM, Pid  wrote:
> >
> >> S Arvind wrote:
> >>> Is the application completely unchanged for deployment on Tomcat 6?
> > yes it is completely *unchanged*... is anything must be changed for
> >>> quartz?
> >> okay, then your best bet is to explore what the JVM is doing after
> >> shutdown and check which threads are still running.
> >>
> >> p
> >>
> >>
> >>
> >>> --Arvind S
> >>>
> >>> *
> >>> "Many of lifes failure are people who did not realize how close they
> were
> >> to
> >>> success when they gave up."
> >>> -Thomas Edison
> >>> *
> >>>
> >>> On Sat, Apr 25, 2009 at 5:06 PM, Pid  wrote:
> >>>
>  Please do not keep using "reply to all".  It is annoying and
>  unnecessary.  I will obviously receive a copy of the mail if you just
>  send a reply to the list.
> 
> > Did you write your application?
> >>> there are team of 200 Engineers wrote that application so i dont
> know
> > where the problem is
> > Are you using Quartz in your application?
> >>> yeah we have quartz scheduler in our application. But when we run
> in
> > Tomcat 5 we dont have this kind of problem
>  Is the application completely unchanged for deployment on Tomcat 6?
> 
>  When you shutdown, Quartz will log a message describing the number of
>  running threads, this may help diagnose the problem.  The count may be
>  above 20, but that isn't necessarily a bad thing.
> 
> 
> > Are you starting new Threads in your app?
> >>> Might be, i have to ask each team.
>  Check that they are being properly terminated.  Even if the devs
> promise
>  they are, double check.
> 
> > When you have started and stopped the application a few times are
> there
> > still multiple java processes running?
> >>> YES, this is the only thing assigned to me to correct it.
>  You should ensure that the old processes are terminated before
> starting
>  new ones, as an old one may hang onto one of the ports that Tomcat
> uses,
>  thus preventing new instances from starting up.
> 
>  The Linux "kill" command can do this.
> 
> 
>  However...
> 
>  After shutdown has been requested and while the process is still
>  running, take a thread dump, or use the java tools to examine the
> state
>  of the JVM.  See if you can spot which Threads are still running.
> 
>  Try jmap, jstack and jconsole (if you're on a local machine).
> 
> 
>  p
> 
> 
> 
> 
> > *"Many of lifes failure are people who did not realize how close they
>  were
> > to success when they gave up."
> > -Thomas Edison
> > *
> >
> > On Sat, Apr 25, 2009 at 2:21 PM, Pid  wrote:
> >
> >> S Arvind wrote:
> >>> Thanks pid...
> >>>
> >>> Can u able to give me more idea to solve it if possible..
> >> Did you write your application?
> >>
> >> Are you using Quartz in your application?
> >>
> >> Are you starting new Threads in your app?
> >>
> >> When you have started and stopped the application a few times are
> >> there
> >> still multiple java processes running?
> >>
> >>
> >> p
> >>
> >>
> >>> Thanks,
> >>> Arvind S
> >>>
> >>>
> >>> *"Many of lifes failure are people who did not realize how close
> they
> >> were
> >>> to success when they gave up."
> >>> -Thomas Edison
> >>> *
> >>>
> >>> On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
> >>>
>  S Arvind wrote:
> > A wierd problem occur while shutdowning the tomcat 6 in the
> Fedora
>  and
> > Centos. Usually i use shell file to shutdown. After shutting down
>  when
>  see
> > the postgre preocess by  [code]*ps -ef | grep java*[/code] it is
>  still
>  showing
> > the process as running.
> >
> > such as

Re: tomcat shutdown problem

2009-04-27 Thread Pid
S Arvind wrote:
> Pid very thanks for guiding me ..  one more help alone... can u please tell
> me how to check which thread it is runnin by quartz other then checking code
> ... i am centos, jvm 5, tomcat 5 and tomcat 6..  i think i am disturbin u
> lot, but   ...

As Dan said, "kill -QUIT ", and as I said previously, familiarise
yourself with jstack, jmap and possibly jconsole, all of which are
command line tools available with the Sun JREs.

p


> -Arvind S
> 
> *
> "Many of lifes failure are people who did not realize how close they were to
> success when they gave up."
> -Thomas Edison*
> 
> 
> On Mon, Apr 27, 2009 at 7:18 PM, Pid  wrote:
> 
>> S Arvind wrote:
>>> Is the application completely unchanged for deployment on Tomcat 6?
> yes it is completely *unchanged*... is anything must be changed for
>>> quartz?
>> okay, then your best bet is to explore what the JVM is doing after
>> shutdown and check which threads are still running.
>>
>> p
>>
>>
>>
>>> --Arvind S
>>>
>>> *
>>> "Many of lifes failure are people who did not realize how close they were
>> to
>>> success when they gave up."
>>> -Thomas Edison
>>> *
>>>
>>> On Sat, Apr 25, 2009 at 5:06 PM, Pid  wrote:
>>>
 Please do not keep using "reply to all".  It is annoying and
 unnecessary.  I will obviously receive a copy of the mail if you just
 send a reply to the list.

> Did you write your application?
>>> there are team of 200 Engineers wrote that application so i dont know
> where the problem is
> Are you using Quartz in your application?
>>> yeah we have quartz scheduler in our application. But when we run in
> Tomcat 5 we dont have this kind of problem
 Is the application completely unchanged for deployment on Tomcat 6?

 When you shutdown, Quartz will log a message describing the number of
 running threads, this may help diagnose the problem.  The count may be
 above 20, but that isn't necessarily a bad thing.


> Are you starting new Threads in your app?
>>> Might be, i have to ask each team.
 Check that they are being properly terminated.  Even if the devs promise
 they are, double check.

> When you have started and stopped the application a few times are there
> still multiple java processes running?
>>> YES, this is the only thing assigned to me to correct it.
 You should ensure that the old processes are terminated before starting
 new ones, as an old one may hang onto one of the ports that Tomcat uses,
 thus preventing new instances from starting up.

 The Linux "kill" command can do this.


 However...

 After shutdown has been requested and while the process is still
 running, take a thread dump, or use the java tools to examine the state
 of the JVM.  See if you can spot which Threads are still running.

 Try jmap, jstack and jconsole (if you're on a local machine).


 p




> *"Many of lifes failure are people who did not realize how close they
 were
> to success when they gave up."
> -Thomas Edison
> *
>
> On Sat, Apr 25, 2009 at 2:21 PM, Pid  wrote:
>
>> S Arvind wrote:
>>> Thanks pid...
>>>
>>> Can u able to give me more idea to solve it if possible..
>> Did you write your application?
>>
>> Are you using Quartz in your application?
>>
>> Are you starting new Threads in your app?
>>
>> When you have started and stopped the application a few times are
>> there
>> still multiple java processes running?
>>
>>
>> p
>>
>>
>>> Thanks,
>>> Arvind S
>>>
>>>
>>> *"Many of lifes failure are people who did not realize how close they
>> were
>>> to success when they gave up."
>>> -Thomas Edison
>>> *
>>>
>>> On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
>>>
 S Arvind wrote:
> A wierd problem occur while shutdowning the tomcat 6 in the Fedora
 and
> Centos. Usually i use shell file to shutdown. After shutting down
 when
 see
> the postgre preocess by  [code]*ps -ef | grep java*[/code] it is
 still
 showing
> the process as running.
>
> such as
>
> [code]  tomcat   14694 1 72 Apr23 ?23:44:25
> /usr/java/jdk1.5.0_13/jre/bin/java
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>
>> -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
> -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
> -Xms1024M -Xmx1024M -Djava.awt.headless=true
>
>> -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
> -classpath
>> :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
> -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
> -Dcatalina.home

Re: tomcat shutdown problem

2009-04-27 Thread S Arvind
Pid very thanks for guiding me ..  one more help alone... can u please tell
me how to check which thread it is runnin by quartz other then checking code
... i am centos, jvm 5, tomcat 5 and tomcat 6..  i think i am disturbin u
lot, but   ...

-Arvind S

*
"Many of lifes failure are people who did not realize how close they were to
success when they gave up."
-Thomas Edison*


On Mon, Apr 27, 2009 at 7:18 PM, Pid  wrote:

> S Arvind wrote:
> > Is the application completely unchanged for deployment on Tomcat 6?
> >>> yes it is completely *unchanged*... is anything must be changed for
> > quartz?
>
> okay, then your best bet is to explore what the JVM is doing after
> shutdown and check which threads are still running.
>
> p
>
>
>
> > --Arvind S
> >
> > *
> > "Many of lifes failure are people who did not realize how close they were
> to
> > success when they gave up."
> > -Thomas Edison
> > *
> >
> > On Sat, Apr 25, 2009 at 5:06 PM, Pid  wrote:
> >
> >> Please do not keep using "reply to all".  It is annoying and
> >> unnecessary.  I will obviously receive a copy of the mail if you just
> >> send a reply to the list.
> >>
> >>> Did you write your application?
> > there are team of 200 Engineers wrote that application so i dont know
> >>> where the problem is
> >>> Are you using Quartz in your application?
> > yeah we have quartz scheduler in our application. But when we run in
> >>> Tomcat 5 we dont have this kind of problem
> >> Is the application completely unchanged for deployment on Tomcat 6?
> >>
> >> When you shutdown, Quartz will log a message describing the number of
> >> running threads, this may help diagnose the problem.  The count may be
> >> above 20, but that isn't necessarily a bad thing.
> >>
> >>
> >>> Are you starting new Threads in your app?
> > Might be, i have to ask each team.
> >> Check that they are being properly terminated.  Even if the devs promise
> >> they are, double check.
> >>
> >>> When you have started and stopped the application a few times are there
> >>> still multiple java processes running?
> > YES, this is the only thing assigned to me to correct it.
> >> You should ensure that the old processes are terminated before starting
> >> new ones, as an old one may hang onto one of the ports that Tomcat uses,
> >> thus preventing new instances from starting up.
> >>
> >> The Linux "kill" command can do this.
> >>
> >>
> >> However...
> >>
> >> After shutdown has been requested and while the process is still
> >> running, take a thread dump, or use the java tools to examine the state
> >> of the JVM.  See if you can spot which Threads are still running.
> >>
> >> Try jmap, jstack and jconsole (if you're on a local machine).
> >>
> >>
> >> p
> >>
> >>
> >>
> >>
> >>> *"Many of lifes failure are people who did not realize how close they
> >> were
> >>> to success when they gave up."
> >>> -Thomas Edison
> >>> *
> >>>
> >>> On Sat, Apr 25, 2009 at 2:21 PM, Pid  wrote:
> >>>
>  S Arvind wrote:
> > Thanks pid...
> >
> > Can u able to give me more idea to solve it if possible..
>  Did you write your application?
> 
>  Are you using Quartz in your application?
> 
>  Are you starting new Threads in your app?
> 
>  When you have started and stopped the application a few times are
> there
>  still multiple java processes running?
> 
> 
>  p
> 
> 
> > Thanks,
> > Arvind S
> >
> >
> > *"Many of lifes failure are people who did not realize how close they
>  were
> > to success when they gave up."
> > -Thomas Edison
> > *
> >
> > On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
> >
> >> S Arvind wrote:
> >>> A wierd problem occur while shutdowning the tomcat 6 in the Fedora
> >> and
> >>> Centos. Usually i use shell file to shutdown. After shutting down
> >> when
> >> see
> >>> the postgre preocess by  [code]*ps -ef | grep java*[/code] it is
> >> still
> >> showing
> >>> the process as running.
> >>>
> >>> such as
> >>>
> >>> [code]  tomcat   14694 1 72 Apr23 ?23:44:25
> >>> /usr/java/jdk1.5.0_13/jre/bin/java
> >>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> >>>
> >>
> -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
> >>> -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
> >>> -Xms1024M -Xmx1024M -Djava.awt.headless=true
> >>>
> -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
> >>> -classpath
> :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
> >>>
> >>> -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
> >>> -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
> >>> -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp
> >>> org.apache.catalina.startup.Bootstrap start  [/code]
> >>>
> >>> So if i keep repeating the sta

Re: tomcat shutdown problem

2009-04-27 Thread Dan Armbrust
> Did you write your application?
>>> there are team of 200 Engineers wrote that application so i dont know
> where the problem is

One (or more) of them made a mistake, and has left a non-daemon thread
running.

You need to find out what thread is running.  One way to do this is to
get a thread dump.

First, ask Tomcat to stop normally.  When it doesn't stop, generate a
thread dump.

kill -QUIT 

will tell the JVM to print a thread dump to the console where the JVM
was started - it will probably go into your tomcat/logs/catalina.out
log file unless you have redirected it somewhere else in your
configuration.

Look at what non-daemon threads are running.  Any non-daemon threads
still running will  need to be fixed by one of your 200 Engineers :)

Dan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat shutdown problem

2009-04-27 Thread Pid
S Arvind wrote:
> Is the application completely unchanged for deployment on Tomcat 6?
>>> yes it is completely *unchanged*... is anything must be changed for
> quartz?

okay, then your best bet is to explore what the JVM is doing after
shutdown and check which threads are still running.

p



> --Arvind S
> 
> *
> "Many of lifes failure are people who did not realize how close they were to
> success when they gave up."
> -Thomas Edison
> *
> 
> On Sat, Apr 25, 2009 at 5:06 PM, Pid  wrote:
> 
>> Please do not keep using "reply to all".  It is annoying and
>> unnecessary.  I will obviously receive a copy of the mail if you just
>> send a reply to the list.
>>
>>> Did you write your application?
> there are team of 200 Engineers wrote that application so i dont know
>>> where the problem is
>>> Are you using Quartz in your application?
> yeah we have quartz scheduler in our application. But when we run in
>>> Tomcat 5 we dont have this kind of problem
>> Is the application completely unchanged for deployment on Tomcat 6?
>>
>> When you shutdown, Quartz will log a message describing the number of
>> running threads, this may help diagnose the problem.  The count may be
>> above 20, but that isn't necessarily a bad thing.
>>
>>
>>> Are you starting new Threads in your app?
> Might be, i have to ask each team.
>> Check that they are being properly terminated.  Even if the devs promise
>> they are, double check.
>>
>>> When you have started and stopped the application a few times are there
>>> still multiple java processes running?
> YES, this is the only thing assigned to me to correct it.
>> You should ensure that the old processes are terminated before starting
>> new ones, as an old one may hang onto one of the ports that Tomcat uses,
>> thus preventing new instances from starting up.
>>
>> The Linux "kill" command can do this.
>>
>>
>> However...
>>
>> After shutdown has been requested and while the process is still
>> running, take a thread dump, or use the java tools to examine the state
>> of the JVM.  See if you can spot which Threads are still running.
>>
>> Try jmap, jstack and jconsole (if you're on a local machine).
>>
>>
>> p
>>
>>
>>
>>
>>> *"Many of lifes failure are people who did not realize how close they
>> were
>>> to success when they gave up."
>>> -Thomas Edison
>>> *
>>>
>>> On Sat, Apr 25, 2009 at 2:21 PM, Pid  wrote:
>>>
 S Arvind wrote:
> Thanks pid...
>
> Can u able to give me more idea to solve it if possible..
 Did you write your application?

 Are you using Quartz in your application?

 Are you starting new Threads in your app?

 When you have started and stopped the application a few times are there
 still multiple java processes running?


 p


> Thanks,
> Arvind S
>
>
> *"Many of lifes failure are people who did not realize how close they
 were
> to success when they gave up."
> -Thomas Edison
> *
>
> On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
>
>> S Arvind wrote:
>>> A wierd problem occur while shutdowning the tomcat 6 in the Fedora
>> and
>>> Centos. Usually i use shell file to shutdown. After shutting down
>> when
>> see
>>> the postgre preocess by  [code]*ps -ef | grep java*[/code] it is
>> still
>> showing
>>> the process as running.
>>>
>>> such as
>>>
>>> [code]  tomcat   14694 1 72 Apr23 ?23:44:25
>>> /usr/java/jdk1.5.0_13/jre/bin/java
>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>
>> -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
>>> -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
>>> -Xms1024M -Xmx1024M -Djava.awt.headless=true
>>> -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
>>> -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
>>>
>>> -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
>>> -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
>>> -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp
>>> org.apache.catalina.startup.Bootstrap start  [/code]
>>>
>>> So if i keep repeating the start and shutdown after few cycles it is
>>> completely refusing to start. What might be the source or reason of
 this
>>> problem? Advance Thanks,
>> If you are leaving an active process behind when you stop the server,
>> then doing it lots of times over isn't going to be healthy.
>>
>> Usually this is because your application has left non-daemon threads
>> running that haven't been shutdown.  It was was recently pointed out
>> (on
>> this list) that the Quartz job scheduler is often a culprit in this
 regard.
>> If you have are starting threads yourself, then you need to make sure
>> that you properly terminate them when the application (

Re: tomcat shutdown problem

2009-04-27 Thread S Arvind
Is the application completely unchanged for deployment on Tomcat 6?
>> yes it is completely *unchanged*... is anything must be changed for
quartz?

--Arvind S

*
"Many of lifes failure are people who did not realize how close they were to
success when they gave up."
-Thomas Edison
*

On Sat, Apr 25, 2009 at 5:06 PM, Pid  wrote:

>
> Please do not keep using "reply to all".  It is annoying and
> unnecessary.  I will obviously receive a copy of the mail if you just
> send a reply to the list.
>
> > Did you write your application?
> >>> there are team of 200 Engineers wrote that application so i dont know
> > where the problem is
>
> > Are you using Quartz in your application?
> >>> yeah we have quartz scheduler in our application. But when we run in
> > Tomcat 5 we dont have this kind of problem
>
> Is the application completely unchanged for deployment on Tomcat 6?
>
> When you shutdown, Quartz will log a message describing the number of
> running threads, this may help diagnose the problem.  The count may be
> above 20, but that isn't necessarily a bad thing.
>
>
> > Are you starting new Threads in your app?
> >>> Might be, i have to ask each team.
>
> Check that they are being properly terminated.  Even if the devs promise
> they are, double check.
>
> > When you have started and stopped the application a few times are there
> > still multiple java processes running?
>
> >>> YES, this is the only thing assigned to me to correct it.
>
> You should ensure that the old processes are terminated before starting
> new ones, as an old one may hang onto one of the ports that Tomcat uses,
> thus preventing new instances from starting up.
>
> The Linux "kill" command can do this.
>
>
> However...
>
> After shutdown has been requested and while the process is still
> running, take a thread dump, or use the java tools to examine the state
> of the JVM.  See if you can spot which Threads are still running.
>
> Try jmap, jstack and jconsole (if you're on a local machine).
>
>
> p
>
>
>
>
> > *"Many of lifes failure are people who did not realize how close they
> were
> > to success when they gave up."
> > -Thomas Edison
> > *
> >
> > On Sat, Apr 25, 2009 at 2:21 PM, Pid  wrote:
> >
> >> S Arvind wrote:
> >>> Thanks pid...
> >>>
> >>> Can u able to give me more idea to solve it if possible..
> >> Did you write your application?
> >>
> >> Are you using Quartz in your application?
> >>
> >> Are you starting new Threads in your app?
> >>
> >> When you have started and stopped the application a few times are there
> >> still multiple java processes running?
> >>
> >>
> >> p
> >>
> >>
> >>> Thanks,
> >>> Arvind S
> >>>
> >>>
> >>> *"Many of lifes failure are people who did not realize how close they
> >> were
> >>> to success when they gave up."
> >>> -Thomas Edison
> >>> *
> >>>
> >>> On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
> >>>
>  S Arvind wrote:
> > A wierd problem occur while shutdowning the tomcat 6 in the Fedora
> and
> > Centos. Usually i use shell file to shutdown. After shutting down
> when
>  see
> > the postgre preocess by  [code]*ps -ef | grep java*[/code] it is
> still
>  showing
> > the process as running.
> >
> > such as
> >
> > [code]  tomcat   14694 1 72 Apr23 ?23:44:25
> > /usr/java/jdk1.5.0_13/jre/bin/java
> > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> >
> >>
> -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
> > -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
> > -Xms1024M -Xmx1024M -Djava.awt.headless=true
> > -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
> > -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
> >
> > -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
> > -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
> > -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp
> > org.apache.catalina.startup.Bootstrap start  [/code]
> >
> > So if i keep repeating the start and shutdown after few cycles it is
> > completely refusing to start. What might be the source or reason of
> >> this
> > problem? Advance Thanks,
>  If you are leaving an active process behind when you stop the server,
>  then doing it lots of times over isn't going to be healthy.
> 
>  Usually this is because your application has left non-daemon threads
>  running that haven't been shutdown.  It was was recently pointed out
> (on
>  this list) that the Quartz job scheduler is often a culprit in this
> >> regard.
>  If you have are starting threads yourself, then you need to make sure
>  that you properly terminate them when the application (and server)
> shuts
>  down.
> 
>  A ServletContextListener is useful in this regard.
> 
> 
>  p
> 
> 
> > Arvind S
> >
> >
> >
> > *
> >>

RE: tomcat shutdown problem

2009-04-25 Thread Martin Gainty

usually ps -ef will show you all active processes with 
PID(processID)  PPID(parentProcessID)  THR(NumThreads) PR(priortity) NAME

More information is available from the brainiacs at University of Illinois
http://www.math.uiuc.edu/~gfrancis/illimath/windows/aszgard_mini/bin/CommandTools/readme1.txt

Martin Gainty 
I have not failed. I've just found 10,000 ways that won't work - Thomas Edison
__ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung / Note de 
déni et de confidentialité 
This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.






> From: arvindw...@gmail.com
> Date: Sat, 25 Apr 2009 14:07:25 +0530
> Subject: Re: tomcat shutdown problem
> To: users@tomcat.apache.org; p...@pidster.com
> 
> Thanks pid...
> 
> Can u able to give me more idea to solve it if possible..
> 
> Thanks,
> Arvind S
> 
> 
> *"Many of lifes failure are people who did not realize how close they were
> to success when they gave up."
> -Thomas Edison
> *
> 
> On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
> 
> > S Arvind wrote:
> > > A wierd problem occur while shutdowning the tomcat 6 in the Fedora and
> > > Centos. Usually i use shell file to shutdown. After shutting down when
> > see
> > > the postgre preocess by  [code]*ps -ef | grep java*[/code] it is still
> > showing
> > >
> > > the process as running.
> > >
> > > such as
> > >
> > > [code]  tomcat   14694 1 72 Apr23 ?23:44:25
> > > /usr/java/jdk1.5.0_13/jre/bin/java
> > > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> > >
> > -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
> > >
> > > -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
> > > -Xms1024M -Xmx1024M -Djava.awt.headless=true
> > > -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
> > > -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
> > >
> > > -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
> > > -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
> > > -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp
> > > org.apache.catalina.startup.Bootstrap start  [/code]
> > >
> > > So if i keep repeating the start and shutdown after few cycles it is
> > > completely refusing to start. What might be the source or reason of this
> > > problem? Advance Thanks,
> >
> > If you are leaving an active process behind when you stop the server,
> > then doing it lots of times over isn't going to be healthy.
> >
> > Usually this is because your application has left non-daemon threads
> > running that haven't been shutdown.  It was was recently pointed out (on
> > this list) that the Quartz job scheduler is often a culprit in this regard.
> >
> > If you have are starting threads yourself, then you need to make sure
> > that you properly terminate them when the application (and server) shuts
> > down.
> >
> > A ServletContextListener is useful in this regard.
> >
> >
> > p
> >
> >
> > > Arvind S
> > >
> > >
> > >
> > > *
> > > "Many of lifes failure are people who did not realize how close they were
> > to
> > >
> > > success when they gave up."
> > > -Thomas Edison*
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >

_
Windows Live™ Hotmail®:…more than just e-mail.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009

Re: tomcat shutdown problem

2009-04-25 Thread Pid

Please do not keep using "reply to all".  It is annoying and
unnecessary.  I will obviously receive a copy of the mail if you just
send a reply to the list.

> Did you write your application?
>>> there are team of 200 Engineers wrote that application so i dont know
> where the problem is

> Are you using Quartz in your application?
>>> yeah we have quartz scheduler in our application. But when we run in
> Tomcat 5 we dont have this kind of problem

Is the application completely unchanged for deployment on Tomcat 6?

When you shutdown, Quartz will log a message describing the number of
running threads, this may help diagnose the problem.  The count may be
above 20, but that isn't necessarily a bad thing.


> Are you starting new Threads in your app?
>>> Might be, i have to ask each team.

Check that they are being properly terminated.  Even if the devs promise
they are, double check.

> When you have started and stopped the application a few times are there
> still multiple java processes running?

>>> YES, this is the only thing assigned to me to correct it.

You should ensure that the old processes are terminated before starting
new ones, as an old one may hang onto one of the ports that Tomcat uses,
thus preventing new instances from starting up.

The Linux "kill" command can do this.


However...

After shutdown has been requested and while the process is still
running, take a thread dump, or use the java tools to examine the state
of the JVM.  See if you can spot which Threads are still running.

Try jmap, jstack and jconsole (if you're on a local machine).


p




> *"Many of lifes failure are people who did not realize how close they were
> to success when they gave up."
> -Thomas Edison
> *
> 
> On Sat, Apr 25, 2009 at 2:21 PM, Pid  wrote:
> 
>> S Arvind wrote:
>>> Thanks pid...
>>>
>>> Can u able to give me more idea to solve it if possible..
>> Did you write your application?
>>
>> Are you using Quartz in your application?
>>
>> Are you starting new Threads in your app?
>>
>> When you have started and stopped the application a few times are there
>> still multiple java processes running?
>>
>>
>> p
>>
>>
>>> Thanks,
>>> Arvind S
>>>
>>>
>>> *"Many of lifes failure are people who did not realize how close they
>> were
>>> to success when they gave up."
>>> -Thomas Edison
>>> *
>>>
>>> On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
>>>
 S Arvind wrote:
> A wierd problem occur while shutdowning the tomcat 6 in the Fedora and
> Centos. Usually i use shell file to shutdown. After shutting down when
 see
> the postgre preocess by  [code]*ps -ef | grep java*[/code] it is still
 showing
> the process as running.
>
> such as
>
> [code]  tomcat   14694 1 72 Apr23 ?23:44:25
> /usr/java/jdk1.5.0_13/jre/bin/java
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>
>> -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
> -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
> -Xms1024M -Xmx1024M -Djava.awt.headless=true
> -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
> -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
>
> -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
> -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
> -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp
> org.apache.catalina.startup.Bootstrap start  [/code]
>
> So if i keep repeating the start and shutdown after few cycles it is
> completely refusing to start. What might be the source or reason of
>> this
> problem? Advance Thanks,
 If you are leaving an active process behind when you stop the server,
 then doing it lots of times over isn't going to be healthy.

 Usually this is because your application has left non-daemon threads
 running that haven't been shutdown.  It was was recently pointed out (on
 this list) that the Quartz job scheduler is often a culprit in this
>> regard.
 If you have are starting threads yourself, then you need to make sure
 that you properly terminate them when the application (and server) shuts
 down.

 A ServletContextListener is useful in this regard.


 p


> Arvind S
>
>
>
> *
> "Many of lifes failure are people who did not realize how close they
>> were
 to
> success when they gave up."
> -Thomas Edison*
>
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 


--

Re: tomcat shutdown problem

2009-04-25 Thread S Arvind
Did you write your application?
>> there are team of 200 Engineers wrote that application so i dont know
where the problem is
Are you using Quartz in your application?
>> yeah we have quartz scheduler in our application. But when we run in
Tomcat 5 we dont have this kind of problem
Are you starting new Threads in your app?
>>Might be, i have to ask each team.
When you have started and stopped the application a few times are there
still multiple java processes running?
>>YES, this is the only thing assigned to me to correct it.





*"Many of lifes failure are people who did not realize how close they were
to success when they gave up."
-Thomas Edison
*

On Sat, Apr 25, 2009 at 2:21 PM, Pid  wrote:

> S Arvind wrote:
> > Thanks pid...
> >
> > Can u able to give me more idea to solve it if possible..
>
> Did you write your application?
>
> Are you using Quartz in your application?
>
> Are you starting new Threads in your app?
>
> When you have started and stopped the application a few times are there
> still multiple java processes running?
>
>
> p
>
>
> > Thanks,
> > Arvind S
> >
> >
> > *"Many of lifes failure are people who did not realize how close they
> were
> > to success when they gave up."
> > -Thomas Edison
> > *
> >
> > On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
> >
> >> S Arvind wrote:
> >>> A wierd problem occur while shutdowning the tomcat 6 in the Fedora and
> >>> Centos. Usually i use shell file to shutdown. After shutting down when
> >> see
> >>> the postgre preocess by  [code]*ps -ef | grep java*[/code] it is still
> >> showing
> >>> the process as running.
> >>>
> >>> such as
> >>>
> >>> [code]  tomcat   14694 1 72 Apr23 ?23:44:25
> >>> /usr/java/jdk1.5.0_13/jre/bin/java
> >>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> >>>
> >>
> -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
> >>> -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
> >>> -Xms1024M -Xmx1024M -Djava.awt.headless=true
> >>> -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
> >>> -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
> >>>
> >>> -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
> >>> -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
> >>> -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp
> >>> org.apache.catalina.startup.Bootstrap start  [/code]
> >>>
> >>> So if i keep repeating the start and shutdown after few cycles it is
> >>> completely refusing to start. What might be the source or reason of
> this
> >>> problem? Advance Thanks,
> >> If you are leaving an active process behind when you stop the server,
> >> then doing it lots of times over isn't going to be healthy.
> >>
> >> Usually this is because your application has left non-daemon threads
> >> running that haven't been shutdown.  It was was recently pointed out (on
> >> this list) that the Quartz job scheduler is often a culprit in this
> regard.
> >>
> >> If you have are starting threads yourself, then you need to make sure
> >> that you properly terminate them when the application (and server) shuts
> >> down.
> >>
> >> A ServletContextListener is useful in this regard.
> >>
> >>
> >> p
> >>
> >>
> >>> Arvind S
> >>>
> >>>
> >>>
> >>> *
> >>> "Many of lifes failure are people who did not realize how close they
> were
> >> to
> >>> success when they gave up."
> >>> -Thomas Edison*
> >>>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: tomcat shutdown problem

2009-04-25 Thread Pid
S Arvind wrote:
> Thanks pid...
> 
> Can u able to give me more idea to solve it if possible..

Did you write your application?

Are you using Quartz in your application?

Are you starting new Threads in your app?

When you have started and stopped the application a few times are there
still multiple java processes running?


p


> Thanks,
> Arvind S
> 
> 
> *"Many of lifes failure are people who did not realize how close they were
> to success when they gave up."
> -Thomas Edison
> *
> 
> On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:
> 
>> S Arvind wrote:
>>> A wierd problem occur while shutdowning the tomcat 6 in the Fedora and
>>> Centos. Usually i use shell file to shutdown. After shutting down when
>> see
>>> the postgre preocess by  [code]*ps -ef | grep java*[/code] it is still
>> showing
>>> the process as running.
>>>
>>> such as
>>>
>>> [code]  tomcat   14694 1 72 Apr23 ?23:44:25
>>> /usr/java/jdk1.5.0_13/jre/bin/java
>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>
>> -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
>>> -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
>>> -Xms1024M -Xmx1024M -Djava.awt.headless=true
>>> -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
>>> -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
>>>
>>> -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
>>> -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
>>> -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp
>>> org.apache.catalina.startup.Bootstrap start  [/code]
>>>
>>> So if i keep repeating the start and shutdown after few cycles it is
>>> completely refusing to start. What might be the source or reason of this
>>> problem? Advance Thanks,
>> If you are leaving an active process behind when you stop the server,
>> then doing it lots of times over isn't going to be healthy.
>>
>> Usually this is because your application has left non-daemon threads
>> running that haven't been shutdown.  It was was recently pointed out (on
>> this list) that the Quartz job scheduler is often a culprit in this regard.
>>
>> If you have are starting threads yourself, then you need to make sure
>> that you properly terminate them when the application (and server) shuts
>> down.
>>
>> A ServletContextListener is useful in this regard.
>>
>>
>> p
>>
>>
>>> Arvind S
>>>
>>>
>>>
>>> *
>>> "Many of lifes failure are people who did not realize how close they were
>> to
>>> success when they gave up."
>>> -Thomas Edison*
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: tomcat shutdown problem

2009-04-25 Thread S Arvind
Thanks pid...

Can u able to give me more idea to solve it if possible..

Thanks,
Arvind S


*"Many of lifes failure are people who did not realize how close they were
to success when they gave up."
-Thomas Edison
*

On Sat, Apr 25, 2009 at 2:00 PM, Pid  wrote:

> S Arvind wrote:
> > A wierd problem occur while shutdowning the tomcat 6 in the Fedora and
> > Centos. Usually i use shell file to shutdown. After shutting down when
> see
> > the postgre preocess by  [code]*ps -ef | grep java*[/code] it is still
> showing
> >
> > the process as running.
> >
> > such as
> >
> > [code]  tomcat   14694 1 72 Apr23 ?23:44:25
> > /usr/java/jdk1.5.0_13/jre/bin/java
> > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> >
> -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
> >
> > -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
> > -Xms1024M -Xmx1024M -Djava.awt.headless=true
> > -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
> > -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
> >
> > -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
> > -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
> > -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp
> > org.apache.catalina.startup.Bootstrap start  [/code]
> >
> > So if i keep repeating the start and shutdown after few cycles it is
> > completely refusing to start. What might be the source or reason of this
> > problem? Advance Thanks,
>
> If you are leaving an active process behind when you stop the server,
> then doing it lots of times over isn't going to be healthy.
>
> Usually this is because your application has left non-daemon threads
> running that haven't been shutdown.  It was was recently pointed out (on
> this list) that the Quartz job scheduler is often a culprit in this regard.
>
> If you have are starting threads yourself, then you need to make sure
> that you properly terminate them when the application (and server) shuts
> down.
>
> A ServletContextListener is useful in this regard.
>
>
> p
>
>
> > Arvind S
> >
> >
> >
> > *
> > "Many of lifes failure are people who did not realize how close they were
> to
> >
> > success when they gave up."
> > -Thomas Edison*
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: tomcat shutdown problem

2009-04-25 Thread Pid
S Arvind wrote:
> A wierd problem occur while shutdowning the tomcat 6 in the Fedora and
> Centos. Usually i use shell file to shutdown. After shutting down when see
> the postgre preocess by  [code]*ps -ef | grep java*[/code] it is still showing
> 
> the process as running.
> 
> such as
> 
> [code]  tomcat   14694 1 72 Apr23 ?23:44:25
> /usr/java/jdk1.5.0_13/jre/bin/java
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.util.logging.config.file=/usr/share/tomcat6/apache-tomcat-6.0.18/conf/logging.properties
> 
> -verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=512M
> -Xms1024M -Xmx1024M -Djava.awt.headless=true
> -Djava.endorsed.dirs=/usr/share/tomcat6/apache-tomcat-6.0.18/endorsed
> -classpath :/usr/share/tomcat6/apache-tomcat-6.0.18/bin/bootstrap.jar
> 
> -Dcatalina.base=/usr/share/tomcat6/apache-tomcat-6.0.18
> -Dcatalina.home=/usr/share/tomcat6/apache-tomcat-6.0.18
> -Djava.io.tmpdir=/usr/share/tomcat6/apache-tomcat-6.0.18/temp
> org.apache.catalina.startup.Bootstrap start  [/code]
> 
> So if i keep repeating the start and shutdown after few cycles it is
> completely refusing to start. What might be the source or reason of this
> problem? Advance Thanks,

If you are leaving an active process behind when you stop the server,
then doing it lots of times over isn't going to be healthy.

Usually this is because your application has left non-daemon threads
running that haven't been shutdown.  It was was recently pointed out (on
this list) that the Quartz job scheduler is often a culprit in this regard.

If you have are starting threads yourself, then you need to make sure
that you properly terminate them when the application (and server) shuts
down.

A ServletContextListener is useful in this regard.


p


> Arvind S
> 
> 
> 
> *
> "Many of lifes failure are people who did not realize how close they were to
> 
> success when they gave up."
> -Thomas Edison*
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org