Bug#574084: Tomcat6 init script fails to clean up stale pid file

Arto Jantunen viiru at debian.org
Tue Mar 16 07:23:37 UTC 2010


Package: tomcat6
Version: 6.0.24-3
Tags: patch

In the case where tomcat is no longer running but the pid file still
exists, the init script simply does nothing with the stop action, and
start and restart fail with "already running". The admin needs to
manually remove the stale pid to get the daemon back.

The attached patch fixes these issues with a slight logic change. The
basic idea is that if no pid file exists we know for a fact that stop
should do nothing and restart should just start the daemon, and in all
cases where a pid file does exist (regardless of the daemon running or
not) we still need to at the very least clean up after a crashed
daemon (by removing the pid file, the tmp directory, etc). 

The attached patch implements this basic idea. I have been running my
extremely crashy tomcats with it for a few days now without any
problems, I consider it to be fairly well tested and stable at this
point.

-- 
Arto Jantunen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tomcat6.patch
Type: text/x-diff
Size: 1244 bytes
Desc: patch
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20100316/ed0ae8bf/attachment.patch>


More information about the pkg-java-maintainers mailing list