I have done some pretty exhaustive - and exhausting - tesing on this
little issue and I think I will probably give up at this stage. Further
things that were suggested by people(see ACK list below) included:
- add 'sleep' after the init startup call
- trap HUP in the init script
- trap HUP in all of the startup scripts (startup.sh,
catalina.sh)
- check the environment settings during startup are as
should be
- check Apache startup is after tomcat - and after a delay
- check the shell is /bin/sh
- check the tomcat logs (always fails just before Coyote
server is started)
- check the symbolic links in /sbin/rc3.c etc.
- look at how HP Internet Express Apache is started for
comparison
- use the Java Service Wrapper (free)
I have tried all of those but the last two. (On the Apache side, although
we run Apache on this system, it is not for the benefit of tomcat. I took
the Apache startup out
altogether, to no avail.)
The relevant extract of the init script now looks like this:
<snip>
#!/bin/sh
trap 'echo tomcat_init >> /tmp/trap' 1
CATALINA_HOME=/web/tomcat
export CATALINA_HOME
JAVA_HOME=/usr/opt/java141
export JAVA_HOME
case "$1" in
'start')
echo "Starting Tomcat...."
su - tcmgr -c "nohup $CATALINA_HOME/bin/startup.sh >
/tmp/tomcat_start.log &"
sleep 30
;;
<snip>
I get the expected tomcat startup lines in /tmp/tomcat_start.log.
Nothing ever arrives in /tmp/trap, including using the same trap in the
tomcat scripts.
One interesting point I discovered is that whichever way I set up the init
script (either to run the startup as root, or to use 'su - application_user
-c' ) the net result is that it *always dumps core* when it terminates. This
is consistent with what happens if I start it manually after boot time, then
send it a HUP. So it suggests that a HUP is somehow getting through to the
final java invocation. Perhaps I need to get a later JVM version. Ah well.
Many thanks to : Narendra Raavi, Andy Wagg, Joachim Jaekel, Judith Reed Tom
Swigg, Joseph A. Senulis, John L.Lanier, Zoong Pham, Bevan Broun, and Oisin
McGuinness.
I do appreciate it.
Cheers for now
Lindsay
**************************************************************************
Experience the British Library online at www.bl.uk
Help the British Library conserve the world's knowledge. Adopt a Book.
www.bl.uk/adoptabook
*************************************************************************
The information contained in this e-mail is confidential and may be legally
privileged. It is intended for the addressee(s) only. If you are not the
intended recipient, please delete this e-mail and notify the
postmaster_at_bl.uk : The contents of this e-mail must not be disclosed or
copied without the sender's consent.
The statements and opinions expressed in this message are those of the
author and do not necessarily reflect those of the British Library. The
British Library does not take any responsibility for the views of the
author.
*************************************************************************
Received on Tue Aug 10 2004 - 15:45:30 NZST