Troubleshooting JBoss Shutdown Issues

When enabling the JMXremote features of the JVM on a JBoss 5.1.2 server configuration, the following error is generated when calling the /bin/shutdown.sh:

javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.system.server.jmx.MBeanServerBuilderImpl:
java.lang.ClassNotFoundException: org.jboss.system.server.jmx.MBeanServerBuilderImpl

Resolution

Sometimes, there is JAVA_OPTS parameter in the environment, and it affects to a java process when the JVM start. From the reason that EAP uses JAVA_OPTS parameter internally, it should not be in the environment.

To clear the parameter in the environment, executing the following from a console:

  1. export JAVA_OPTS=""
  2. env|grep JAVA_OPTS

    JAVA_OPTS= <You will see this message>

  3. shutdown.sh -s jnp://localhost:1099 -u USER -p PASSWORD

Root Cause

JMX related options should not be set in JAVA_OPTS when calling shutdown.sh. Ensure JAVA_OPTS is only set when starting JBoss EAP, not when running.