You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by emerson cargnin <ec...@gmail.com> on 2010/03/10 10:59:19 UTC

6.0.24 Pid Problem

We have a wrapper script that is in charge of starting and stopping tomcat.

Since we moved from 6.0.20 to 6.0.24 we started to get a few issues
with the pid not been removed properly making the start script to fail
and never starting tomcat.

I know of the change that added a delay parameter to the start/stop
steps. Is anyone aware of any other change that might had affected our
wrapper script?

Regards
Emerson

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: 6.0.24 Pid Problem

Posted by emerson cargnin <ec...@gmail.com>.
That is an script we use for a while already, as after restarting,
there is a one or two things that need to be done.
The thing is that the wrapper worked before until 6.0.20. It was on
6.0.24 that the pid started to be left after stop.

It seems like tomcat is taking longer to stop, and the standard 5
seconds isn't enough and then it fails, leaving behind the pid file.

I am testing now increasing the timeout parameter.

Emerson

On 10 March 2010 10:20, Pid <pi...@pidster.com> wrote:
> On 10/03/2010 09:59, emerson cargnin wrote:
>>
>> We have a wrapper script that is in charge of starting and stopping
>> tomcat.
>>
>> Since we moved from 6.0.20 to 6.0.24 we started to get a few issues
>> with the pid not been removed properly making the start script to fail
>> and never starting tomcat.
>>
>> I know of the change that added a delay parameter to the start/stop
>> steps. Is anyone aware of any other change that might had affected our
>> wrapper script?
>
> Where did you get the wrapper script from?
>
>
> p
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: 6.0.24 Pid Problem

Posted by Pid <pi...@pidster.com>.
On 10/03/2010 09:59, emerson cargnin wrote:
> We have a wrapper script that is in charge of starting and stopping tomcat.
>
> Since we moved from 6.0.20 to 6.0.24 we started to get a few issues
> with the pid not been removed properly making the start script to fail
> and never starting tomcat.
>
> I know of the change that added a delay parameter to the start/stop
> steps. Is anyone aware of any other change that might had affected our
> wrapper script?

Where did you get the wrapper script from?


p

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: 6.0.24 Pid [file] Problem

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Emerson,

On 3/10/2010 4:59 AM, emerson cargnin wrote:
> We have a wrapper script that is in charge of starting and stopping tomcat.
> 
> Since we moved from 6.0.20 to 6.0.24 we started to get a few issues
> with the pid not been removed properly making the start script to fail
> and never starting tomcat.

It looks like this was added to the "start" portion of catalina.sh in
6.0.24:

  if [ ! -z "$CATALINA_PID" ]; then
    if [ -f "$CATALINA_PID" ]; then
      echo "PID file ($CATALINA_PID) found. Is Tomcat still running? \
Start aborted."
      exit 1
    fi
  fi

This is probably what you're running into.

> I know of the change that added a delay parameter to the start/stop
> steps. Is anyone aware of any other change that might had affected our
> wrapper script?

I think it's only a delay with "stop": I don't see anything in
catalina.sh to delay a start, but there is logic to wait for Tomcat to
stop and then remove the PID file.

The default sleep time is 5 seconds. If your webapp and/or Tomcat can't
shut down in that time, the pid file will remain. Have you tried
increasing the timeout? It looks like calling this from your script
would extend the sleep time:

$CATALINA_HOME/bin/catalina.sh stop 25

This will give Tomcat 25 seconds to stop.

You might want to use jstack to see what Tomcat is doing when its taking
a long time to shut down. Perhaps you can change your webapp to shut
down more quickly.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuXxJUACgkQ9CaO5/Lv0PCciQCgs4f+U0BLGrCE9CbO0w0B6epb
eiEAoKwPyFhlPO70GGVOVfcqXZ/8Aei7
=u4y8
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org