January 5, 2013

How to Remote Connect JConsole to JBoss EAP 6

One of the maybe most imported task after deployment, is to establish a good monitoring tool. The standardized tool for Java is JConsole.

To remotely connect to a application server, have previously been a pain, but the standardization work has finally given some fruit. The JBoss EAP 6 and AS 7 server now supports the JSR 160 - JMX Remote API for remote management and monitoring. The JSR 160 is a great leap forward, since the standard does not build upon RMI, which makes it really hard to use behind a firewall and only have access via SSH port. So now is JMXConnector used and under the hood uses JBoss its own remoting libraries. The only drawback with this is that you have to add these dependency libraries when starting jconsole. But Red Hat had already provided a ready cooked script for that.

So lets start trying this out. Start with by unzipping a fresh jboss-eap-6.0.1.zip to a new folder and start the server in standalone mode.

The next thing we need to is to create a management user, since the JMXConnector requires login. We create new users with the add-user.sh script.

Now we are ready to start the jconsole on a remote machine, with the jconsole.sh script.

Before starting the jconsole, be sure that you have set the JAVA_HOME environment variable.

Now you can remotely login to service:jmx:remoting-jmx://, with the above credential.


Luigi Fugaro said...

Connecting on port 9999, you just monitor the [Host Controller] process, not the "real" JVM where your applications are deployed.

Am I wrong or missing something???


Arun Kumar said...

I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Alfresco , kindly contact us http://www.maxmunus.com/contact
MaxMunus Offer World Class Virtual Instructor led training on Alfresco. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us:
Name : Arunkumar U
Email : arun@maxmunus.com
Skype id: training_maxmunus
Contact No.-+91-9738507310
Company Website –http://www.maxmunus.com