-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Phani,

On 12/2/2009 1:30 AM, raj kumar wrote:
> When i ran tomcat and shut it down my java process is not closing along with
> shutdown.

See others' responses for why you should have to do this. Otherwise...

> i need to kill it explicitly. So  I would like to know how to
> identify the java process of the logged in user who started the server. so
> that i can kill the process id from the shutdown.sh script itself.

You won't be using the shutdown.sh script to kill Tomcat unless you hack
it up to do that. I'd recommend against that.

What I would recommend is using the CATALINA_PID environment variable
helpfully documented in bin/catalina.sh:

# Environment Variable Prequisites
[...]
#   CATALINA_PID    (Optional) Path of the file which should contains
#                   the pid of catalina startup java process, when
#                   start (fork) is used

Try setting this environment variable to something like
"/var/run/tomcat.pid" and you should get a file in that location
containing the pid of the Java process started by Tomcat.

Then, you can do something like:

$ kill -9 `cat /var/run/tomcat.pid`

Forget all these ridiculous suggestions of running 'ps' and grepping the
output for all kinds of crazy strings. That may or may not work at all.
The above strategy was intended by the Tomcat developers to be used to
capture the PID of the Java process, so go ahead and use that.

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

iEYEARECAAYFAksW0KwACgkQ9CaO5/Lv0PA7uQCgxBiy3snTbF49e8FXPp/+qARn
qncAoI4/CLEItiHOiZxCioRfpHcCiGZ5
=AP2a
-----END PGP SIGNATURE-----

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

Reply via email to