Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tomcat 4.1.12 shutdown problem linux 7.3.2 1

Status
Not open for further replies.

aisne

Programmer
Sep 19, 2005
5
ZA
Hi
I am experiencing a problem with restarting tomcat. Am running tomcat standalone. When tomcat is shut down (shutdown.sh) and then restarted (startup.sh) from a cron job, the previous java processes are still present (I can see them by using ps -aux). Any ideas why? There are no errors reported in the shutdown cron job.

Further when I try to manually kill the java processes (killall java) the system shuts down the adm daemon as well. I am not clear why this is either.

Any insights would be greatly appreciated.

Aisne
 
This is due to how the Linux process implementation handles threads (the pthread API).

In Linux, if a thread is still running in the process, the process will not exit until the thread ends - so to kill the process, a kill, or pkill command must be issued to force the threads and process to exit.

Tomcat relies heavily on a multithreaded API called JMX - and I expect either this API, or one of tomcat's internal threads are not shutting down (ie the interrupt() thread hook is either not implemented correctly, or Tomcat is not calling interrupt on all its threads on shutdown).

I don't know what the "adm daemon" is .. so cannot offer advice on this.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Thanks for the info. Also the pkill command was what I needed instead of killall.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top