Showing posts with label J2EE. Show all posts
Showing posts with label J2EE. Show all posts

Tuesday, 5 November 2013

JBoss Monitoring from JConsole

This was a very simple issue pointed to me by a friend:
"OK.. it would be interesting to restrict jmx-console over http and instead, use JConsole to monitor our JBoss 5.0.1.GA from a VPN tunneled port"

JConsole is a very important tool for monitoring the JVM. It is located in you JAVA_HOME/bin.

This is very simple for the local JBoss process, in other words, when JConsole and JBoss are running on the same machine. You just have to start JBoss and run JConsole.

In case when JBoss is running on a different IP you just have to find the following line in your server.log:

2012-03-16 04:58:30,047 INFO  [org.jboss.mx.remoting.service.JMXConnectorServerService] (main) JMX Connector server: service:jmx:rmi://kandath/jndi/rmi://kandath:1090/jmxconnector

Get the connector server URL:
 service:jmx:rmi://kandath/jndi/rmi://kandath:1090/jmxconnector
paste it to the JConsole  as the following picture instructs:
JBoss as a local process and remote using remote JMX service

JBoss 5.1.0.GA comes preconfigured with the following: 
1.  JMX service is on and port to use for RMI by default is set to 1090.
2. No security on JMX console!
Consider seriously to secure the access to the JMX service.

Also read the following interesting bug on JBoss jira