Enable JMX MBean server connections
Before the JBoss agent can gather data from the JBoss server, Java™ Management Extensions (JMX) MBean server connections must be enabled.
Procedure
Follow the steps for your JBoss server release and version.
-
Configure EAP 5.2.
Make a backup copy of the run.conf file, then add the following lines to it:
JAVA_OPTS="$JAVA_OPTS -Djboss.platform.mbeanserver" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false" JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=1090" JAVA_OPTS="$JAVA_OPTS -Djavax.management.builder.initial= org.jboss.system.server.jmx.MBeanServerBuilderImpl"
-
Configure AS 6.x.
Specify the bind address as a parameter when you start the JBoss server.
- jboss_server_home/bin/run.sh -b Ip_address
- jboss_server_home\bin\run.bat -b <Ip_address>
where jboss_server_home is the JBoss server installation directory.
For example, if the bind address is 10.77.9.250:
/apps/wildfly-9.0.2.Final/bin/run.sh -b 10.77.9.250
-
Configure all other supported versions.
JBoss and WildFly servers are installed with their JMX ports disabled for remote management by default. You must change the configuration of the JBoss server to allow remote management. You must edit the jboss_server_home/standalone/configuration/standalone.xml to allow remote management.
- Make a backup copy of
jboss_server_home/standalone/configuration/standalone.xml
file.
Where jboss_server_home is the JBoss server installation directory.
-
Allow remote configuration.
Search for
urn:jboss:domain:jmx
and within its subsystem section, make sure that theremoting-connector
entry hasuse-management-endpoint="true"
.Example result.
<subsystem xmlns="urn:jboss:domain:jmx:1.3"> <expose-resolved-model/> <expose-expression-model/> <remoting-connector use-management-endpoint="true"/> </subsystem>
-
Allow remote connections.
Find where the interfaces are defined and replace 127.0.0.1 (loopback) with the external IP on the server to bind to. Do not bind to 0.0.0.0.
Example before replacement.<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:127.0.0.1}"/> </interface> ...
Example after the replacement if the external IP address is 192.168.101.1.<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:192.168.101.1}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:192.168.101.1}"/> </interface> ...
- Make a backup copy of
jboss_server_home/standalone/configuration/standalone.xml
file.