Bug#324845: tomcat4: Stopping Tomcat with a cronjob

Barry Hawkins barry at bytemason.org
Thu Aug 25 18:55:33 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

severity 324845 normal

Michael Nitsche wrote:
[...]
> I've running a cronjob that stops Tomcat, runs updates to the webapps and
> starts Tomcat again. Normally its running perfectly. But already two times
> in this month the server wasn't reachable and hasn't any log entrys after
> running the cronjob. The server answer only to ping, but to nothing else, 
> so a external restart is necessary. Heres the line in /etc/crontab:
> 
> 30 3    * * *   root    /etc/init.d/tomcat4 stop >/dev/null; /root/bald.sh >/dev/null; /etc/init.d/tomcat4 start >/dev/null
> 
> The bald.sh-Script have only one rsync-command, that normally has nothing 
> to do! The same error already arose without this Script on 
> running "/etc/init.d/tomcat4 restart" in /etc/crontab!
[...]
> I need the restart of Tomcat also, because after few Days Tomcat forget
> the correct Charset. After a restart everything is right!
[...]
Michael,
    Thank you for your use of Debian and the tomcat4 package.  This is
almost certainly not a bug with the tomcat4 package.  The initscript for
tomcat4 calls the standard scripts to start and stop the Tomcat server;
these start and stop requests are not synchronous calls.  You could very
well be running your rsync update while the server is still shutting
down and/or starting up.
    I would recommend modifying your approach to have your /etc/crontab
entry call a single script that incorporates the calls to tomcat4's
initscript for shutdown and startup to hopefully wield more control over
the timing of your rsync operation.  On a separate but related note,
this is not an ideal way to refresh your copies of J2EE web applications
running on a Tomcat server.  Look into automating application
deployments with Ant scripts and Tomcat's Ant tasks to have application
refreshing be handled a bit more gracefully.  I will be resetting the
priority of this bug to normal.  Please post an update to the bug report
so we can hopefully close this bug out soon.
    If, after investigating the above suggestions, you feel the issue
still lies within the scope of tomcat4 package, post that to the report
as well.  Before we could really evaluate this issue, we have to be able
to try and reproduce it, so you would need to include your bald.sh
script an any other information needed to reproduce the error.   Be sure
to mention what JDK you are running under, the number/type of apps you
are rsyncing to Tomcat, etc.
    Tomcat "forgetting" the Charset seems quite odd, but it is most
likely unrelated to startup and shutdown.  If you still feel that it is
an issue related to the tomcat4 package itself and not particular
applications running on your Tomcat server, please file that as a
separate bug with a severity of normal.

Regards,
- --
Barry Hawkins
site: www.bytemason.org
weblog: www.yepthatsme.com

Registered Linux User #368650
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDDhQkHuKcDICy0QoRAg93AJ473w1P2V5Mg5vTh9xIN7knYjZunQCePNn0
e0uCY1q1363s6VzhuIT8HYw=
=uelw
-----END PGP SIGNATURE-----




More information about the pkg-java-maintainers mailing list