From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Wakeman, Lindsay" Newsgroups: gmane.os.tru64.managers Subject: Update: tomcat startup Date: Tue, 10 Aug 2004 16:43:10 +0100 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <5D6AD0E24C704645A0F1F1431B9F216106FCADD5@nt-lonex2.bl.uk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Trace: sea.gmane.org 1092152670 26972 80.91.224.253 (10 Aug 2004 15:44:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 10 Aug 2004 15:44:30 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Tue Aug 10 17:44:03 2004 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1BuYnC-0003oo-00 for ; Tue, 10 Aug 2004 17:44:02 +0200 Original-Received: (qmail 26093 invoked by uid 5); 10 Aug 2004 15:43:56 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 26078 invoked by uid 49501); 10 Aug 2004 15:43:56 -0000 Original-Received: from Lindsay.Wakeman@bl.uk by sws1 by uid 49491 with qmail-scanner-1.21 (clamdscan: 0.70-rc. iscan: v3.1/v5.600-1011/847/50540. spamassassin: 2.63. Clear:RC:0(160.91.4.119):SA:0(-4.9/5.0):. Processed in 0.921583 secs); 10 Aug 2004 15:43:56 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 10 Aug 2004 15:43:55 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2-X27 #30899) with ESMTP id <0I2800I4AMCZYI@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 10 Aug 2004 11:43:54 -0400 (EDT) Original-Received: from VIRUSCAN-DAEMON.emroute1.cind.ornl.gov by emroute1.cind.ornl.gov (PMDF V6.2-X27 #30899) id <0I2800G02MCM5G@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 10 Aug 2004 11:43:41 -0400 (EDT) Original-Received: from nt-lonex2.bl.uk (nt-lonex2.bl.uk [193.60.210.61]) by emroute1.cind.ornl.gov (PMDF V6.2-X27 #30899) with ESMTP id <0I2800G08MCL4N@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Tue, 10 Aug 2004 11:43:34 -0400 (EDT) Original-Received: by nt-lonex2.bl.uk with Internet Mail Service (5.5.2657.72) id ; Tue, 10 Aug 2004 16:43:13 +0100 Content-return: allowed Original-To: "'tru64-unix-managers@ornl.gov'" X-Mailer: Internet Mail Service (5.5.2657.72) Xref: main.gmane.org gmane.os.tru64.managers:7422 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:7422 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: #!/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 ;; 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@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. *************************************************************************