Update: tomcat startup

From: Wakeman, Lindsay (Lindsay.Wakeman_at_bl.uk)
Date: 08/10/04

  • Next message: Praveen Patle: "Cluster member hanging after adding"
    Date: Tue, 10 Aug 2004 16:43:10 +0100
    To: "'tru64-unix-managers@ornl.gov'" <tru64-unix-managers@ornl.gov>
    
    

       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@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.

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


  • Next message: Praveen Patle: "Cluster member hanging after adding"

    Relevant Pages

    • Update: tomcat startup
      ... " It is hard to be certain without seeing the details of the startup ... sending a HUP to my tomcat process does indeed prove that it cannot ... However, it isn't clear how to fix this, since init is running /bin/sh to ... my startup script for tomcat, which in turn 'execs' the standard tomcat ...
      (Tru64-UNIX-Managers)
    • Re: startup / shutdown script (rc.d)
      ... I actually looked at the apache one, and it seemed so complicated, there ... all you script has to do is look ... Presuming you have one routine to run at startup ...
      (freebsd-questions)
    • Re: startin mysql when booting
      ... when you compile MySQL yourself, ... How or where can I get a chkconfig compatible apache startup script? ...
      (RedHat)
    • Re: startup / shutdown script (rc.d)
      ... Here is my script: ... I actually looked at the apache one, and it seemed so complicated, there ... During startup it calls them with an argument ... Presuming you have one routine to run at startup ...
      (freebsd-questions)
    • Re: Still looking for a calendar server...
      ... Still looking for a calendar server... ... getting tomcat to work with apache is becoming a challenge. ... I'm currently trying to get bedework working, ...
      (freebsd-questions)