- Red Hat JBoss Enterprise Application Platform (EAP)
- Oracle JDK
- 7 Update 40 (7u40) onwards
- 11 onwards
- How to connect Java Mission Control (jmc) with a EAP 6 server instance?
- Managed to connect the server instance with jconsole using the
jmxsubsystem. Is there any script to launch jmc?
- How do we integrate Java Mission Control (jmc) and EAP 6?
To connect to individual server instances in domain mode, first see Connecting To JBoss Via JConsole in Domain Mode for the pre-requisite configuration changes needed to connect to the individual instances on port 4447 instead of the host controller on port 9999.
To connect this
jmcwith a EAP server instance you can follow the steps below:
"jdk1.7.0_51/bin/jmc.ini"file which contains the JVM and
JAVA_OPTSrelated information in this file somewhere at the end users can add the
"-Xbootclasspath/a"option to include the
-startup ../lib/missioncontrol/plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library ../lib/missioncontrol/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807 -vm ./java -vmargs -XX:+UseG1GC -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -Djava.net.preferIPv4Stack=true -Xbootclasspath/a:/jboss-eap-6.2.0/bin/client/jboss-client.jar <--------NOTICE HERE------>
If Management Interface has https configured, then add the following to the
"jmc.ini"file is edited as above then Java Mission Control (jmc) can be started as following:
Once the Java Mission Control GUI is opened then you will get a Welcome window like this:
Then you have to close this welcome window and then click on
"Create New Custom JVM Connection"icon which is highlighted by the red line in the following screenshot on the
Then in the following
"JVM Connection"wizard click on
"Custom JMX Service URL"button:
Then Enter the
"JMX Service URL"in the below pattern in the following
JVM Connection Window:
service:jmx:remoting-jmx://$HOST:$PORT Example: service:jmx:remoting-jmx://10.10.10.10:9999
For EAP 7
service:jmx:remote+http://jbosshost:9990 or service:jmx:remote+https://jbosshost:9993 if SSL is enabled.
Enter the JBoss management Username and Password and then click on finish.
Now it is connected to JBoss EAP server instance and the similar kind of entry will be added in the JVM Browser:
After getting connected you can monitor the
Runtime memory viewas follows:
We need to add the
"jboss-client.jar" file in the bootclasspath of the jmc because it contains the
"remote-jmx" protocol which is specific to JBoss EAP6+ else it will throw
Unsupported protocol: remoting-jmx .
As per link Java Mission Control, this tool is started with the release of Oracle JDK 7 Update 40 (7u40), Java Mission Control is bundled with the HotSpot JVM.
To configure Flight Recorder, refer How to use Oracle JDK Java Flight Recorder.
- Learn more
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.