Showing posts with label JBoss. Show all posts
Showing posts with label JBoss. Show all posts

Wednesday, November 28, 2007

Connecting jconsole to JBoss JMX server

So I was working on integrating the JBI ant tasks to the Open ESB distribution for JBoss and I was having some issues connecting to the JMX server. So, I wanted to try something simple and see if I could connect jconsole to the JMX server first. Out of the box this does not work. You will have to add some system properties to your run.sh or run.bat file for this to work. It's pretty simple really, but took me a while to find. For this to work just add the following properties to you run.sh file:


# Enable the jconsole agent remotely on port 64850
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=64850"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"


Next, start JBoss and once it is started you can start jconsole by issuing the command jconosle from a command window. You can connect in one of three ways. If you are connecting locally just select the local tab, you will see the PID and the class for JBoss and select Connect. If you are connecting to remotely select the remote tab and enter the Host/IP and the Port (the one you entered in your run.sh file).