Update: tomcat startup

From: Wakeman, Lindsay (Lindsay.Wakeman@bl.uk)
Date: Tue Aug 03 2004 - 05:31:25 EDT


  

Thanks to all those who replied: Tom Swigg, Joseph A. Senulis, John L.
Lanier, Zoong Pham, Bevan Broun - and especially to Oisin McGuinness who I
believe has explained what is wrong. And I apologise that I hadn't found his
similar response to this list before :-|

Here is his reply:

  
   " It is hard to be certain without seeing the details of the startup
script,
    but a common issue when moving startup scripts for applications
    that work on other Unixen to Tru64 Unix, is that the init process
    on Tru64 Unix will send anything started up by it a HUP signal
    after the startup. If your daemon (e.g. Apache is OK) can handle
    a HUP signal and either ignore it or reread the configuration file
    then that's OK, but if it is not handled, you have a problem.
    (Even though you have a nohup statement, I think you may find Tomcat
    is getting a HUP...)

    Very easy test: find the PID of your running Tomcat server, and send it
HUP.
    If it goes down, you will need to add a signal handler somewhere. "

 So, sending a HUP to my tomcat process does indeed prove that it cannot
handle it.

However, it isn't clear how to fix this, since init is running /bin/sh to
run
my startup script for tomcat, which in turn 'execs' the standard tomcat
startup scripts that come with the distro, which finally launches a JVM for
the tomcat server.

I'm not running Apache, just the tomcat servlet server (Tomcat 4.1.1-27).
Tomcat starts up and works fine when invoked manually and has done for
months. This is a definite 'init' startup problem. I have all the symbolic
links set up in the rc directories, and the catalina.out log shows it
starting up.

 So I guess I'm left with 3 questions:

  1. Why does the 'nohup' command I am using not work?
  2. Has anyone successfully introduced a 'nohup' further down the line -
e.g. in the final catalina.sh script?
   3. Why does Tru64 init send HUPs anyway to child processes it has just
started?
  
 Thanks!

Lindsay

 PS I did originally include the whole script when posting to this list, but
the post was rejected as 'spam' (or similar)!

> -----Original Message-----
> From: Wakeman, Lindsay [mailto:Lindsay.Wakeman@bl.uk]
> Sent: 02 August 2004 14:30
> To: 'tru64-unix-managers@ornl.gov'
> Subject: tomcat startup
>
>
>
> Hello all,
>
> My apologies if this is a bit application-oriented. I have
> been unable to
> get a script to work that will start up the Apache tomcat
> server process on
> bootup (i.e. using init). The script I have tried most
> recently works fine
> on a Solaris machine, but not on Tru64 (5.1A patchkit 6).
> The relevant line
> in the init.d script (which also sets JAVA_HOME) is:
>
> nohup $CATALINA_HOME/bin/startup.sh >
> /tmp/tomcat_start.log 2>&1 &
>
>
> The script works when it's called manually once the system
> is up, but
> when invoked through init the process appears to disappear
> very quickly.
>
> I have searched for solutions and tried various suggested
> in other circles
> to no avail.
>
> Has anyone managed to do this? If so can you tell me what
> I'm doing wrong?
>
> TIA
>
> Lindsay
>
> Lindsay Wakeman
> UNIX Systems Administrator, Applications Development South
> The British Library
> lindsay.wakeman@bl.uk
>
>
>
>
> **************************************************************
> ************
>
> 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.
>
> **************************************************************
> ***********
>

**************************************************************************

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.

*************************************************************************



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:50:05 EDT