How to connect to JBoss EAP 7 using JConsole in Standalone mode?

Solution Verified - Updated

Environment

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

Issue

  • How to connect to JBoss EAP 7 using JConsole?
  • Can not connect to JBoss EAP 7 via http-remoting-jmx. I have successfully done the same in the past on EAP 6 and remoting-jmx.
  • To enable JMX when the JVM options are updated to add the JMX parameters, servers are failing to start with the exception.

Resolution

In Standalone mode, JMX is enabled by default, so will just need to follow the below steps to connect remotely:

  1. JBoss EAP 7.x stream requires JVM 1.8 (for EAP 7.0.x/7.1.x) and 1.8/11 (for EAP 7.2.x+) as per Supported Configuration, then make sure the JAVA_HOME variable value is properly setup in $EAP_HOME/bin/jconsole.sh and $EAP_HOME/bin/standalone.conf files, and the environment variable $JAVA_HOME as well.

  2. Create a ManagementUser using the $EAP_HOME/bin/add-user.sh, (for example username: admin, password: admin12#). This step can be skipped if the user was already created to login into the JBoss EAP Management Console, and to use the same user.

  3. Start the JBoss EAP server exposing the Management interface to a public interface in order to enable access from another host in the environment. Do it using the below command for example. $YOUR_IP is the IP / host that you want EAP to bind, by default it binds localhost / 127.0.0.1

        $EAP_HOME/bin/standalone.sh -c standalone-full.xml -bmanagement $YOUR_IP
    
        or
    
        $EAP_HOME/bin/standalone.sh -c standalone-full.xml -Djboss.bind.address.management=$YOUR_IP
    
  4. In case that, running JConsole in the same JBoss EAP machine, go through the $EAP_HOME/bin/ directory and execute the jconsole.sh script. On condition of a remote host, unzip a fresh installation of the JBoss EAP and run the same script.

    $EAP_HOME/bin/jconsole.sh
    
  5. The Jconsole shipped by the JBoss EAP has the necessary libraries to access the remote JMX. With the Username and Password created on step 2, use the below remote connection URL at Remote Process: field to access the JMX through the Jconsole:

    service:jmx:remote+http://$YOUR_IP:9990
    

For Domain mode, use this article.

Diagnostic Steps

  • The default port used by the management interface is 9990, so if this port was changed, it will have to change in the port number on URL connection.

    08:48:32,547 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://10.10.10.10:9990/management
    08:48:32,547 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://10.10.10.10:9990
    
  • If getting Unsupported protocol: remote+http, make sure, not be using EAP6's jboss-client.jar.

    • If not using the jconsole.sh/jconsole.bat from $JBOSS_HOME/bin , then you need to add the jboss-cli-client.jar from EAP on the classpath for jconsole so that it understands the protocol remote+http.
  • See: How to enable DEBUG logging for JMX tools.

  • JBoss EAP 6 and 7 have different protocols, see How to connect to JBoss EAP 6 using JConsole.

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.