Bug 38020 - www/jakarta-tomcat4: stop tomcat via java -jar bootstrap.jar stop
Summary: www/jakarta-tomcat4: stop tomcat via java -jar bootstrap.jar stop
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sam Lawrance
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-13 07:10 UTC by ari.suutari
Modified: 2006-02-07 08:58 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ari.suutari 2002-05-13 07:10:00 UTC
When tomcat is installed with ports/www/jakarta-tomcat4 port, it uses
daemonctl.c to manage execution of JVM. When daemonctl is used to
stop currently executing tomcat, it does this by issuing kill -SIGTERM
to tomcat process. This causes tomcat to stop immediately, without
normal shutdown activities, like unloading servlets etc.

Fix: 

The shutdown should be handled by issuing command "java -Dcatalina.home=path-to-catalina-home -jar bin/bootstrap.jar stop". 
This causes tomcat to unload servlets gracefully and then stop.
Maybe the current "stop" command of daemonctl.c could be renamed to "kill" or "abort" and "stop" could execute the command above.
How-To-Repeat: Install tomcat4 via www/jakarta-tomcat4 port, start it and then stop it.
Comment 1 Ernst de Haan freebsd_committer freebsd_triage 2002-05-15 19:29:57 UTC
Responsible Changed
From-To: freebsd-ports->znerd

I should handle this.
Comment 2 Ernst de Haan freebsd_committer freebsd_triage 2002-05-21 20:03:23 UTC
State Changed
From-To: open->analyzed

This is a good idea.
Comment 3 Herve Quiroz freebsd_committer freebsd_triage 2004-12-03 13:30:58 UTC
State Changed
From-To: analyzed->feedback

Is this PR still relevant? 

We are sorry for the delay. Let's sort this out now. 


Comment 4 Herve Quiroz freebsd_committer freebsd_triage 2004-12-03 13:30:58 UTC
Responsible Changed
From-To: znerd->freebsd-java

With znerd's permission, I'm doing a cleanup of his PRs as he is not active on  
the FreeBSD ports front for now.  

Over to the FreeBSD Java community.
Comment 5 ari.suutari 2005-04-04 12:47:44 UTC
Solution I submitted to ports/38018 fixes this also.
Comment 6 Volker Stolz freebsd_committer freebsd_triage 2005-12-15 09:01:08 UTC
Dear maintainer, please look into this issue!

Volker
Comment 7 Sam Lawrance freebsd_committer freebsd_triage 2006-01-26 03:20:51 UTC
Responsible Changed
From-To: freebsd-java->lawrance

Handle it.
Comment 8 Sam Lawrance freebsd_committer freebsd_triage 2006-02-07 08:56:03 UTC
State Changed
From-To: feedback->closed

An rc script was committed to tomcat 4, 4.1, 5, and 5.5 
which improves on the shutdown process. 

The new process uses bootstrap.jar to initiate a clean 
shutdown.  After a default timeout of 10 seconds, the 
tomcat process will be killed. 

This is configurable using the tomcatXX_stop_timeout rc 
variable.  Please see the rc scripts for details. 

Thanks for your submission!