How to connect to JBoss EAP using JConsole

Solution Verified - Updated -

Issue

  • How to configure JMX monitoring with JBoss EAP 6/7?
  • How to monitor JBoss health ?
  • How does one enable the JMX port on EAP 6?
  • Unable to use JConsole when JBoss is running as windows service.
  • After adding following JAVA_OPTIONS options to the configuration file
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver"
JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial=org.jboss.mx.server.MBeanServerBuilderImpl"
JAVA_OPTS="$JAVA_OPTS  -Dcom.sun.management.jmxremote.port=9002"
JAVA_OPTS="$JAVA_OPTS  -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS  -Dcom.sun.management.jmxremote.ssl=false"

and getting the following errors:

WARNING: Failed to load the specified log manager class org.jboss.logmanager.LogManager
java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
    at org.jboss.logmanager.Logger.getLogger(Logger.java:61)
    at org.jboss.as.server.Main.main(Main.java:84)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.jboss.modules.Module.run(Module.java:270)
    at org.jboss.modules.Main.main(Main.java:294)

java.lang.ClassNotFoundException: org.jboss.logmanager.LogManagererror while trying to connect to JBoss EAP6 using JConsole.

Commons Daemon procrun stderr initialized Could not load Logmanager "org.jboss.logmanager.LogManager"
java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager
 at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 at java.util.logging.LogManager$1.run(LogManager.java:185)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.util.logging.LogManager.<clinit>(LogManager.java:175)
 at java.util.logging.Logger.getLogger(Logger.java:327)
 at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55)
 at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstrap.java:823)
 at sun.management.Agent.startAgent(Agent.java:244)
 at sun.management.Agent.startAgent(Agent.java:369)

javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.system.server.jmx.MBeanServerBuilderImpl: java.lang.ClassNotFoundException: org.jboss.system.server.jmx.MBeanServerBuilderImpl
 at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:502)
 at javax.management.MBeanServerFactory.getNewMBeanServerBuilder(MBeanServerFactory.java:538)
 at javax.management.MBeanServerFactory.newMBeanServer(MBeanServerFactory.java:315)
 at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:230)
 at javax.management.MBeanServerFactory.createMBeanServer(MBeanServerFactory.java:191)
 at java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:466)
 at sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:453)
 at sun.management.Agent.startAgent(Agent.java:244)
 at sun.management.Agent.startAgent(Agent.java:369)
Caused by: java.lang.ClassNotFoundException: org.jboss.system.server.jmx.MBeanServerBuilderImpl
 at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 at javax.management.MBeanServerFactory.loadBuilderClass(MBeanServerFactory.java:445)
 at javax.management.MBeanServerFactory.checkMBeanServerBuilder(MBeanServerFactory.java:487)
 ... 8 more
Exception thrown by the agent : javax.management.JMRuntimeException: Failed to load MBeanServerBuilder class org.jboss.system.server.jmx.MBeanServerBuilderImpl: java.lang.ClassNotFoundException: org.jboss.system.server.jmx.MBeanServerBuilderImpl
  • How to integrate JConsole with JBoss EAP 6?
  • How do enable JMX monitoring?
  • Is JMX supported on JBoss EAP 6?
  • Found an issue that EAP 6.1 does not support sun jmx as mentioned here then how to monitor EAP process from remote machine ?
  • How to connect to JBoss EAP6 server running on Linux via Jconsole which is running on windows OS ?
  • I start EAP6 on using standalone.bat then then I start jconsole using jconsole.bat. MBeans are supposed to appear in jboss.as module in MBeans Tab. But it doesn't happen.
  • Unable to run JMX on JBoss EAP 6.
  • Not able to launch jconsole.
  • It is possible to access arbitrary JMX attributes on arbitrary MBeans.
  • We are trying to enable JMX monitoring through Data Dog(DD). For this I have installed DD-Agent on the server locally per DD instructions but I can't get JMX working or unable to see through Jconsole. Error I am seeing is :
| ERROR| App | Cannot connect to instance localhost:9999 java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused]
  • JBOSS 6.2 configuration management. We are not able to connect the Jboss 6.2 EAP to any of the tools like Jconsole, Visual VM for monitoring JVM.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 8.x
    • 7.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content