There's a problem with older versions of Tomcat (including many that we use in production) such that adding jmx options to JAVA_OPTS makes the server not-shut-downable.

The basic problem is that the jmx options are really only applicable to the running server process; the java that's spawned to talk to the server to shut it down doesn't really need them, but so long as the jmx options are passed it will try to bind port 9000 and fail and not start and not shut down the server.

The solution is to add the jmx options to CATALINA_OPTS instead, assuming you're running a newish version of Tomcat.  (5.5.23+ and 6.0.15+.)

For older versions of tomcat, you can create your own version of CATALINA_OPTS, find the relevant spot in catalina.sh, and add it to the java options by hand.

More detail: https://issues.apache.org/bugzilla/show_bug.cgi?id=36976

  • No labels