JMX Access To Standalone EAP 7: Difference between revisions
No edit summary |
No edit summary |
||
(5 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
=Overview= | =Overview= | ||
A generic JMX client connects to a standalone EAP 7 instance using [[WildFly_Management_Interfaces# | A generic JMX client connects to a standalone EAP 7 instance using [[WildFly_Management_Interfaces#The_HTTP_Endpoint|the HTTP endpoint of the standalone instance's management interface]]. For an in-depth explanation on how that works, see [[Remoting_WildFly_Subsystem_Concepts#Remoting_and_JMX_Access|Remoting Concepts - Remoting and JMX Access]]. 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. Also, the access must be secured by adding a specific user (or using an existing user) to the management realm, associated with the HTTP management interface. | ||
=Server Endpoint= | =Server Endpoint= | ||
The generic JMX client must connect to [[WildFly_Management_Interfaces# | The generic JMX client must connect to [[WildFly_Management_Interfaces#The_HTTP_Endpoint|the HTTP endpoint of the standalone instance's management interface]]. | ||
The host address and port binding for the endpoint are specified as "management- | The host address and port binding for the endpoint are specified as "management-http" socket binding, in [[standalone.xml]] configuration file: | ||
<pre> | <pre> | ||
<socket-binding-group name="standard-sockets" ...> | <socket-binding-group name="standard-sockets" ...> | ||
... | ... | ||
<socket-binding name="management- | <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/> | ||
</socket-binding-group> | </socket-binding-group> | ||
</pre> | </pre> | ||
The port value is | The port value is 9990. | ||
<blockquote style="background-color: Gold; border: solid thin Goldenrod;"> | <blockquote style="background-color: Gold; border: solid thin Goldenrod;"> | ||
Line 48: | Line 48: | ||
<pre> | <pre> | ||
2016-10-18 20:45:33,598 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management | |||
</pre> | </pre> | ||
Line 73: | Line 73: | ||
* [[Jconsole#jconsole_Classpath_and_Startup_Options|jconsole]] | * [[Jconsole#jconsole_Classpath_and_Startup_Options|jconsole]] | ||
* [[Using VisualVM with WildFly|VisualVM]] | * [[Using VisualVM with WildFly|VisualVM]] | ||
* [[ | * [[Dynatrace_and_JMX#JMX_Integration_with_JBoss|Dynatrace]] | ||
* [[DataDog]] | * [[DataDog_and_JMX#JMX_integration_with_JBoss|DataDog]] | ||
==URL== | ==URL== | ||
Line 81: | Line 81: | ||
<pre> | <pre> | ||
service:jmx: | service:jmx:remote+http://<server-host>:9990 | ||
</pre> | </pre> | ||
Latest revision as of 14:47, 21 October 2016
External
- How to connect to JBoss EAP 7 using JConsole https://access.redhat.com/solutions/2435131
- How to access MBeanServerConnection from remote JMX Client in JBoss EAP 7 https://access.redhat.com/solutions/2604501
Internal
Overview
A generic JMX client connects to a standalone EAP 7 instance using the HTTP endpoint of the standalone instance's management interface. For an in-depth explanation on how that works, see Remoting Concepts - Remoting and JMX Access. 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. Also, the access must be secured by adding a specific user (or using an existing user) to the management realm, associated with the HTTP management interface.
Server Endpoint
The generic JMX client must connect to the HTTP endpoint of the standalone instance's management interface.
The host address and port binding for the endpoint are specified as "management-http" socket binding, in standalone.xml configuration file:
<socket-binding-group name="standard-sockets" ...> ... <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/> </socket-binding-group>
The port value is 9990.
If the standalone instance runs with a specific port offset, the management endpoint port value must account for that offset.
The actual value for the management interface bind address is specified under the related "management" interface specification:
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> </interface> ... </interfaces>
Unless explicitly re-configured, the default bind address for the management interface is 127.0.0.1.
The bind address and the port are reported as INFO, as follows:
2016-10-18 20:45:33,598 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
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 Management Realm of the server instance we connect to. The procedure to add a user to the Management Realm is presented in detail here:
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:remote+http://<server-host>:9990
where <server-host> is the interface the native management endpoint is bound to. If the client and server are collocated, that is usually 127.0.0.1.
Authentication
Use the username and the password configured on the server, as described in the "Server Endpoint Authentication" section.
SSL Connection Configuration
TODO, come up with the full procedure, until then, more details are available here: https://access.redhat.com/solutions/632773