Chris,

Thank you... I would never have thought about this script. I'll fire that baby up tonight.

Thanks,

Carl

----- Original Message ----- From: "Christopher Schultz" <ch...@christopherschultz.net>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Friday, February 12, 2010 10:49 AM
Subject: Re: Tomcat dies suddenly


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

Jeffrey,

On 2/12/2010 10:31 AM, Jeffrey Janner wrote:
Also, the OP mentioned that it doesn't seem to occur if only the
production app is being hit.  It takes someone using one of the other
copies first to generate the problem. So the questions occur:

1) Are you absolutely positive that there is no code that could be
calling exit()?

One way to check this would be to launch the JVM using a script that
captures the exit code of the process:

$!/bin/sh

# Grab all these variable definitions from bin/catalina.sh

   "$_RUNJAVA" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
     -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
     -Dcatalina.base="$CATALINA_BASE" \
     -Dcatalina.home="$CATALINA_HOME" \
     -Djava.io.tmpdir="$CATALINA_TMPDIR" \
     org.apache.catalina.startup.Bootstrap "$@" start \
     >> "$CATALINA_BASE"/logs/catalina.out 2>&1

result=$?

echo "JVM existed with status code=${result}"

If it's 0, then the changes that this is due to a System.exit(0) call
are very high.

You could also try running under a SecurityManager, and prohibit
System.exit() calls.

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

iEYEARECAAYFAkt1eKMACgkQ9CaO5/Lv0PBMIACgkZAP4UQQqVpELU2Ej4HQFOLI
7GEAn1rsUxRxvyXBrKGBYlomkaI0WN8C
=hSGU
-----END PGP SIGNATURE-----

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




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

Reply via email to