Tomcat start problem

Discussion in 'Java' started by iherage, Jan 25, 2007.

  1. iherage

    iherage Guest

    When I type in Linux console:

    $/etc/init.d/tomcat5 start
    I got the following message.

    starting tomcat lock file found but on process running for pid 9968,
    continuing
    Using CATALINA_BASE: /usr/share/tomcat5
    Using CATALINA_HOME: /usr/share/tomcat5
    Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
    Using JRE_HOME:

    And every time the process pid is different.

    Why there is such a problem?
    Does anyone know the solutions?

    Thank you.
     
    iherage, Jan 25, 2007
    #1
    1. Advertising

  2. On 25 Jan 2007 02:53:01 -0800, iherage wrote:
    > When I type in Linux console:
    >
    > $/etc/init.d/tomcat5 start
    > I got the following message.
    >
    > starting tomcat lock file found but on process running for pid 9968,
    > continuing
    > Using CATALINA_BASE: /usr/share/tomcat5
    > Using CATALINA_HOME: /usr/share/tomcat5
    > Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
    > Using JRE_HOME:
    >
    > And every time the process pid is different.
    >
    > Why there is such a problem?
    > Does anyone know the solutions?


    What is the *real* problem? Is the service not working?

    Of course the pid will be different almost every time you start the
    service. And of course any lockfile left by a previous incarnation
    will almost always contain a different pid.

    Perhaps you are referring to the prior existence of the lockfile,
    which seems to indicate that you failed to stop the service properly
    last time. Had you done so, it most likely would have removed the
    lockfile.

    Does this have anything to do with Java progamming?

    /gordon

    --
    [ don't email me support questions or followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
     
    Gordon Beaton, Jan 25, 2007
    #2
    1. Advertising

  3. On Jan 25, 2:53 am, "iherage" <> wrote:
    > When I type in Linux console:
    >
    > $/etc/init.d/tomcat5 start
    > I got the following message.
    >
    > starting tomcat lock file found but on process running for pid 9968,
    > continuing
    > Using CATALINA_BASE: /usr/share/tomcat5
    > Using CATALINA_HOME: /usr/share/tomcat5
    > Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
    > Using JRE_HOME:
    >
    > And every time the process pid is different.
    >
    > Why there is such a problem?
    > Does anyone know the solutions?
    >
    > Thank you.


    Why are you running tomcat from /etc/init.d ? Looks like the process
    has started already by init during Linux startup, and hence the lock
    file. Can you do a ps -eaf | grep 'java' and see if you already see a
    running tomcat? If you do, log in as root and do a kill -9 <pid>, where
    <pid> will be the process ID you see by running ps. Then you should be
    able to start tomcat.

    -cheers,
    Manish
     
    Manish Pandit, Jan 25, 2007
    #3
  4. iherage

    Lars Enderin Guest

    Manish Pandit skrev:
    > On Jan 25, 2:53 am, "iherage" <> wrote:
    >> When I type in Linux console:
    >>
    >> $/etc/init.d/tomcat5 start
    >> I got the following message.
    >>
    >> starting tomcat lock file found but on process running for pid 9968,
    >> continuing
    >> Using CATALINA_BASE: /usr/share/tomcat5
    >> Using CATALINA_HOME: /usr/share/tomcat5
    >> Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
    >> Using JRE_HOME:
    >>
    >> And every time the process pid is different.
    >>
    >> Why there is such a problem?
    >> Does anyone know the solutions?
    >>
    >> Thank you.

    >
    > Why are you running tomcat from /etc/init.d ? Looks like the process
    > has started already by init during Linux startup, and hence the lock
    > file. Can you do a ps -eaf | grep 'java' and see if you already see a
    > running tomcat? If you do, log in as root and do a kill -9 <pid>, where
    > <pid> will be the process ID you see by running ps. Then you should be
    > able to start tomcat.
    >

    Why not simply restart instead of start? Or stop followed by start?
    And -9 should not be necessary, either.
     
    Lars Enderin, Jan 25, 2007
    #4
  5. iherage

    Nigel Wade Guest

    Manish Pandit wrote:

    >
    > On Jan 25, 2:53 am, "iherage" <> wrote:
    >> When I type in Linux console:
    >>
    >> $/etc/init.d/tomcat5 start
    >> I got the following message.
    >>
    >> starting tomcat lock file found but on process running for pid 9968,
    >> continuing
    >> Using CATALINA_BASE: /usr/share/tomcat5
    >> Using CATALINA_HOME: /usr/share/tomcat5
    >> Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
    >> Using JRE_HOME:
    >>
    >> And every time the process pid is different.
    >>
    >> Why there is such a problem?
    >> Does anyone know the solutions?
    >>
    >> Thank you.

    >
    > Why are you running tomcat from /etc/init.d ?


    Probably because that is the correct way to start it?
    It is most likely the correct way to stop and restart it also.

    > Looks like the process
    > has started already by init during Linux startup, and hence the lock
    > file. Can you do a ps -eaf | grep 'java' and see if you already see a
    > running tomcat? If you do, log in as root and do a kill -9 <pid>, where
    > <pid> will be the process ID you see by running ps.


    Using kill to abort tomcat rather than using the init script is exactly the
    reason why the lock files get left hanging around in the first place. If there
    is an init script provided to handle the daemon startup/shutdown procedure then
    use it.

    > Then you should be
    > able to start tomcat.


    The lock file will still be there, and maybe a whole host of other things, which
    the proper shutdown procedure would clean up.

    --
    Nigel Wade, System Administrator, Space Plasma Physics Group,
    University of Leicester, Leicester, LE1 7RH, UK
    E-mail :
    Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
     
    Nigel Wade, Jan 26, 2007
    #5
  6. iherage

    iherage Guest

    Thank you for all the replies.

    Finally, I download Tomcat 6, the latest version. Now I do not have
    that kind of problems any longer.

    Actually it was my friend who install tomcat 5 and tried to start it.

    I do not know whether it was a common problem with Tomcat 5. But with
    tomcat 6 everything seems fine.

    PS when you want use java servlet, it seems that you have to installed
    tomcat. So I think it is related to Java Programming. And there is a
    installation guild for tomcat in Windows in the famous book JAVA HOW
    TO PROGRAM(6e).

    On 1ÔÂ26ÈÕ, ÏÂÎç3ʱ36·Ö, Nigel Wade <..uk> wrote:
    > Manish Pandit wrote:
    >
    > > On Jan 25, 2:53 am, "iherage" <> wrote:
    > >> When I type in Linux console:

    >
    > >> $/etc/init.d/tomcat5 start
    > >> I got the following message.

    >
    > >> starting tomcat lock file found but on process running for pid 9968,
    > >> continuing
    > >> Using CATALINA_BASE: /usr/share/tomcat5
    > >> Using CATALINA_HOME: /usr/share/tomcat5
    > >> Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
    > >> Using JRE_HOME:

    >
    > >> And every time the process pid is different.

    >
    > >> Why there is such a problem?
    > >> Does anyone know the solutions?

    >
    > >> Thank you.

    >
    > > Why are you running tomcat from /etc/init.d ?

    >
    > Probably because that is the correct way to start it?
    > It is most likely the correct way to stop and restart it also.
    >
    > > Looks like the process
    > > has started already by init during Linux startup, and hence the lock
    > > file. Can you do a ps -eaf | grep 'java' and see if you already see a
    > > running tomcat? If you do, log in as root and do a kill -9 <pid>, where
    > > <pid> will be the process ID you see by running ps.

    >
    > Using kill to abort tomcat rather than using the init script is exactly the
    > reason why the lock files get left hanging around in the first place. If there
    > is an init script provided to handle the daemon startup/shutdown procedure then
    > use it.
    >
    > > Then you should be
    > > able to start tomcat.

    >
    > The lock file will still be there, and maybe a whole host of other things, which
    > the proper shutdown procedure would clean up.
    >
    > --
    > Nigel Wade, System Administrator, Space Plasma Physics Group,
    > University of Leicester, Leicester, LE1 7RH, UK
    > E-mail :
    > Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
     
    iherage, Feb 3, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DESANTIS77

    problem with tomcat/web start

    DESANTIS77, Jun 29, 2003, in forum: Java
    Replies:
    1
    Views:
    1,428
    VisionSet
    Jun 29, 2003
  2. Christos Gravvanis
    Replies:
    0
    Views:
    2,052
    Christos Gravvanis
    Jul 7, 2004
  3. Aleksandar Matijaca
    Replies:
    2
    Views:
    8,325
    Aleksandar Matijaca
    Sep 19, 2004
  4. Rakesh Pandit
    Replies:
    0
    Views:
    506
    Rakesh Pandit
    Jul 12, 2005
  5. Marcin Cenkier
    Replies:
    1
    Views:
    5,428
    Marcin Cenkier
    Apr 12, 2006
Loading...

Share This Page