Can I create a generic JMX server resource in JBoss ON that connects to JBoss EAP 6 or 7?

Solution Verified - Updated -

Issue

  • How to view JMX services in JON server to perform operations like in JConsole?
  • I get the exception "Necessary classes not found for remote connection...".
  • How to configure the JMX plug-in in to connect to JBoss Application Server (AS) 7 or JBoss Enterprise Application Platform (EAP) 6/7?
  • JMX server connection fails with the following error:

    ERROR [WorkerThread#0[127.0.0.1:42524]] (rhq.core.pc.inventory.InventoryManager)- Manual add failed for resource of type [JMX Server] and parent resource id [10001]
    java.lang.reflect.UndeclaredThrowableException
        at $Proxy70.discoverResource(Unknown Source)
        at org.rhq.core.pc.inventory.InventoryManager.discoverResource(InventoryManager.java:362)
        at org.rhq.core.pc.inventory.InventoryManager.manuallyAddResource(InventoryManager.java:738)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        ...
    Caused by: java.lang.Exception: Discovery component invocation failed.
        at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:297)
        ...
    Caused by: java.lang.RuntimeException: Failed to connect to JVM with connector address [service:jmx:remoting-jmx://127.0.0.1:9999].
        at org.rhq.plugins.jmx.JMXDiscoveryComponent.discoverResource(JMXDiscoveryComponent.java:241)
        ...
    Caused by: org.mc4j.ems.connection.EmsConnectException: Could not connect [service:jmx:remoting-jmx://127.0.0.1:9999] org.mc4j.ems.connection.EmsConnectException: Malformed url
        at org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider.connect(AbstractConnectionProvider.java:106)
        at org.rhq.plugins.jmx.JMXDiscoveryComponent.discoverResource(JMXDiscoveryComponent.java:234)
        ... 10 more
    Caused by: org.mc4j.ems.connection.EmsConnectException: Malformed url
        at org.mc4j.ems.impl.jmx.connection.support.providers.JMXRemotingConnectionProvider.doConnect(JMXRemotingConnectionProvider.java:160)
        at org.mc4j.ems.impl.jmx.connection.support.providers.AbstractConnectionProvider.connect(AbstractConnectionProvider.java:101)
        ... 11 more
    Caused by: java.net.MalformedURLException: Unsupported protocol: remoting-jmx
        at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:345)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:266)
        at org.mc4j.ems.impl.jmx.connection.support.providers.JMXRemotingConnectionProvider.doConnect(JMXRemotingConnectionProvider.java:143)
        ... 12 more
    
  • Can the agent connect to JBoss EAP 6 as a JMX client?

Environment

  • Red Hat JBoss Operations Network (ON) 3.1.2, 3.2, 3.3
  • Red Hat JBoss Enterprise Application Platform (EAP) 6.0, 6.0.1, 6.4, 7
  • Red Hat JBoss Application Server (AS) 7 plug-in for JBoss ON
  • Red Hat JBoss Enterprise Application Platform 7 (EAP7) plug-in for JBoss ON
  • JBoss EAP (versions 6.0 and 6.1) has been configured with the JMX module enabled (urn:jboss:domain:jmx) and its show-model element set to true:

            <subsystem xmlns="urn:jboss:domain:jmx:1.1">
                <show-model value="true"/>
                <remoting-connector/>
            </subsystem>
    
  • JBoss EAP (versions after 6.1) has been configured in the following way:

           <subsystem xmlns="urn:jboss:domain:jmx:1.3">
               <expose-resolved-model/>
               <expose-expression-model/>
               <remoting-connector/>
            </subsystem>
    

    Note: The existance of the expose-resolved-model child is translated into the show-model=true attribute in the older versions of EAP 6 (6.0.1 and 6.1)

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