Tomcat startup - Suse

This is a discussion on Tomcat startup - Suse ; I have tomcat55 set to start up at boot. However it fails. I suspect that this is due to it needing Apache to start first. If I start tomcat manually it starts o.k. If I use the run level editor ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Tomcat startup

  1. Tomcat startup

    I have tomcat55 set to start up at boot. However it fails. I suspect that
    this is due to it needing Apache to start first. If I start tomcat
    manually it starts o.k. If I use the run level editor and disable/enable
    tomcat then tomcat starts o.k. So it 'seems' that if Apache is already
    running then tomcat starts. What I'd like to do is to add a small delay in
    the tomcat startup. Where and how do I do this ?

    TIA


    BTW this has happened for several versions of openSUSE so it seems to be a
    bug... Yes, If I can fix this by adding a small time delay I will file a
    bug report....

  2. Re: Tomcat startup

    Michael Soibelman wrote:

    > I have tomcat55 set to start up at boot. However it fails. I suspect
    > that
    > this is due to it needing Apache to start first. If I start tomcat
    > manually it starts o.k. If I use the run level editor and disable/enable
    > tomcat then tomcat starts o.k. So it 'seems' that if Apache is already
    > running then tomcat starts. What I'd like to do is to add a small delay
    > in
    > the tomcat startup. Where and how do I do this ?
    >
    > TIA
    >
    >
    > BTW this has happened for several versions of openSUSE so it seems to be a
    > bug... Yes, If I can fix this by adding a small time delay I will file a
    > bug report....


    Forgot to mention I'm using openSUSE-10.3 on this box. Also, Apache starts
    up at boot as well. But I think it isn't fully initialized before tomcat
    tries to start. Thus causing this problem.

  3. Re: Tomcat startup

    On Tue, 28 Oct 2008 13:27:07 -0700, Michael Soibelman wrote:

    > I have tomcat55 set to start up at boot. However it fails. I suspect
    > that this is due to it needing Apache to start first.


    As far as I know Tomcat is not dependent on Apache (at least in the
    default setup). It is a separate entity. I believe there is a connector
    that you can have between Apache and Tomcat. Do you have that installed?

    I have never used the connector, but I do have a few tomcat servers at
    work and none of them require apache to run.


    >If I start tomcat
    > manually it starts o.k. If I use the run level editor and
    > disable/enable tomcat then tomcat starts o.k. So it 'seems' that if
    > Apache is already running then tomcat starts. What I'd like to do is to
    > add a small delay in the tomcat startup. Where and how do I do this ?


    I have just quickly installed tomcat (6) on my openSUSE 11.0 box
    (including the connector). According to the init script, it doesn't have
    a dependency on apache to start.
    From /etc/init.d/tomcat6

    # tomcat6 This shell script takes care of starting and stopping Tomcat
    #
    # chkconfig: - 80 20
    #
    ### BEGIN INIT INFO
    # Provides: tomcat6
    # Required-Start: $network $syslog $remote_fs
    # Required-Stop: $network $syslog
    # Default-Start:
    # Default-Stop:
    # Description: Release implementation for Servlet 2.5 and JSP 2.1
    # Short-Description: start and stop tomcat
    ### END INIT INFO
    #
    # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
    # - heavily rewritten by Deepak Bhole and Jason Corley
    #


    Have a look at the order they are set to start in. One way to do this is
    to run (from a command prompt):
    ls /etc/init.d/rc*.d/ | egrep "S.*(apache|tomcat)"

    This will give you a listing of all of the start links to apache or
    tomcat.
    The output might look something like:
    S09tomcat6
    S15apache2
    S09tomcat6
    S15apache2

    According to this tomcat is actually starting before apache (The number
    between the S and the name indicates the order of starting).

    Can you confirm that apache starting is your real issue? One way to do
    this is manually stop apache and try to start tomcat.


    You could look in the boot logs ( /var/log/boot.msg ) to see if it gives
    you any hints as to why the startup is failing.


    You could also look at the tomcat logs, which probably live in:
    /var/log/tomcat5/base/
    particularly look at:
    start.log
    catalina.out

    >
    > TIA
    >
    >
    > BTW this has happened for several versions of openSUSE so it seems to be
    > a bug... Yes, If I can fix this by adding a small time delay I will
    > file a bug report....






    --
    Regards,
    David Bailey
    david _AT_ bailey dot id dot au

  4. Re: Tomcat startup

    On Tue, 28 Oct 2008 13:27:07 -0700, Michael Soibelman wrote:

    > I have tomcat55 set to start up at boot. However it fails. I suspect
    > that this is due to it needing Apache to start first.


    As far as I know Tomcat is not dependent on Apache (at least in the
    default setup). It is a separate entity. I believe there is a connector
    that you can have between Apache and Tomcat. Do you have that installed?

    I have never used the connector, but I do have a few tomcat servers at
    work and none of them require apache to run.


    >If I start tomcat
    > manually it starts o.k. If I use the run level editor and
    > disable/enable tomcat then tomcat starts o.k. So it 'seems' that if
    > Apache is already running then tomcat starts. What I'd like to do is to
    > add a small delay in the tomcat startup. Where and how do I do this ?


    I have just quickly installed tomcat (6) on my openSUSE 11.0 box
    (including the connector). According to the init script, it doesn't have
    a dependency on apache to start.
    From /etc/init.d/tomcat6

    # tomcat6 This shell script takes care of starting and stopping Tomcat
    #
    # chkconfig: - 80 20
    #
    ### BEGIN INIT INFO
    # Provides: tomcat6
    # Required-Start: $network $syslog $remote_fs
    # Required-Stop: $network $syslog
    # Default-Start:
    # Default-Stop:
    # Description: Release implementation for Servlet 2.5 and JSP 2.1
    # Short-Description: start and stop tomcat
    ### END INIT INFO
    #
    # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
    # - heavily rewritten by Deepak Bhole and Jason Corley
    #


    Have a look at the order they are set to start in. One way to do this is
    to run (from a command prompt):
    ls /etc/init.d/rc*.d/ | egrep "S.*(apache|tomcat)"

    This will give you a listing of all of the start links to apache or
    tomcat.
    The output might look something like:
    S09tomcat6
    S15apache2
    S09tomcat6
    S15apache2

    According to this tomcat is actually starting before apache (The number
    between the S and the name indicates the order of starting).

    Can you confirm that apache starting is your real issue? One way to do
    this is manually stop apache and try to start tomcat.


    You could look in the boot logs ( /var/log/boot.msg ) to see if it gives
    you any hints as to why the startup is failing.


    You could also look at the tomcat logs, which probably live in:
    /var/log/tomcat5/base/
    particularly look at:
    start.log
    catalina.out

    >
    > TIA
    >
    >
    > BTW this has happened for several versions of openSUSE so it seems to be
    > a bug... Yes, If I can fix this by adding a small time delay I will
    > file a bug report....


  5. Re: Tomcat startup

    David Bailey wrote:

    > On Tue, 28 Oct 2008 13:27:07 -0700, Michael Soibelman wrote:
    >
    >> I have tomcat55 set to start up at boot. However it fails. I suspect
    >> that this is due to it needing Apache to start first.

    -------------------------------------------snip---------------------------------------
    >
    > You could also look at the tomcat logs, which probably live in:
    > /var/log/tomcat5/base/
    > particularly look at:
    > start.log
    > catalina.out
    >
    >>
    >> TIA
    >>
    >>
    >> BTW this has happened for several versions of openSUSE so it seems to be
    >> a bug... Yes, If I can fix this by adding a small time delay I will
    >> file a bug report....

    >
    >
    >
    >
    >

    Seems you're right. I stopped Apache and started Tomcat o.k. So now I'll
    look at the tomcat logs and see what is going on.

    Thanks. I'll get back to this thread after reading the log...

+ Reply to Thread