JMX Access to Domain Mode EAP 6 Server Node

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

A generic JMX client connects to a domain server node using the server node's remoting endpoint. Unlike a standalone server node, a domain mode server node does not expose a management interface native endpoint, so the server node has to be explicitly configured to allow JMX access over the general purpose remoting connector. More details on how that is configured is available below. Specific JBoss libraries must be added to the generic client's classpath, and we will show how those can be added for Visual VM and jconsole. The access must be secured by adding a new user to the applications realm associated with the remoting connector. An existing user with proper credentials can also be used.

Server Endpoint

Configuring the Remote Connector for JMX Access

A domain mode server node does not expose a management interface native endpoint so a generic JMX client must use the general purpose remoting connector, defined by the Remoting subsystem. The remoting connector must be explicitly configured to allow JMX access, by setting the use-management-endpoint attribute to false in the corresponding profiled from domain.xml:

<subsystem xmlns="urn:jboss:domain:jmx:1.3">
    ...
   <remoting-connector use-management-endpoint="false"/>
</subsystem>

Server Endpoint Bind Address and Port

The host address and port binding for the remoting connector are specified as part of the "remoting" socket binding in domain.xml:

<socket-binding-groups>
    <socket-binding-group name="standard-sockets" default-interface="public">
        ...
        <socket-binding name="remoting" port="4447"/>
    </socket-binding-group>
   ...
</socket-binding-groups>

The default port value is 4447.


If the server node runs with a specific port offset, the port value must account for that offset.

The corresponding "public" interface bind address is configured in the <interfaces> section in the host.xml configuration file of the host controller that manages the server node:

<interfaces>
    ...
    <interface name="public">
        <inet-address value="${jboss.bind.address:127.0.0.1}"/>
    </interface>
    ...
</interfaces>

Unless explicitly re-configured, the default bind address for the public interface is 127.0.0.1.

The bind address and the port are reported as INFO in the corresponding server node log, as follows:

18:00:03,095 INFO  [org.jboss.as.remoting] (MSC service thread 1-12) JBAS017100: Listening on 127.0.0.1:4447

The bind address and port will be needed when assembling the URL to be used by the JMX client, below.

Server Endpoint Authentication

A generic JMX client usually provides a username and a password when connecting. Those values must be explicitly added to the Application Realm of the server node we connect to, because the remoting connector authenticates by default against the ApplicationRealm security realm. For more details on remoting security see Remoting Concepts - Security.

The procedure to add a user to the Application Realm is presented in detail here:

Adding a User to the Application Realm.

Note that no specific group is necessary to be specified during the procedure.

JMX Client

The generic JMX client must add client JBoss libraries to its class path and must set up JBoss specific system properties, as shown below. It also must use a specific URL to connect, and the user and the password configured on the server, as described in the "Server Endpoint Authentication" section.

JMX Client Classpath and Startup Options

The JBoss JAR $JBOSS_HOME/bin/client/jboss-cli-client.jar must be added to the JMX client classpath. Also, the JMX client must be started with -Dmodule.path=${JBOSS_HOME}/modules. Specific details for a number of clients are available below:

URL

Use:

service:jmx:remoting-jmx://<domain-mode-server-node-host>:4447

where <domain-mode-server-node-host> is the interface the public interface of the server node is bound to.

Authentication

Use the username and the password configured on the server, as described in the "Server Endpoint Authentication" section.

SSL Connection Configuration

https://access.redhat.com/solutions/632773

TODO.