Monitoring JBOSS 7 AS with VisualVM

SETTING UP THE ENVIRONMENT

It seems that VisualVM needs to access JBOSS environment to work. And some other customizations needed to make everything work. We will post here our experiences.

 

CONFIGURE VISUALVM

First of all is add classpath of the profiler JBOSS libs.

 

We added this to the script provided by VisualVM:

 

CLASSPATH=""
JBOSS_MODULEPATH="/home/gaguilar/jboss-as-7.1.1.Final-duplicate/modules"
MODULES="org/jboss/remoting3/remoting-jmx org/jboss/remoting3 org/jboss/logging org/jboss/xnio org/jboss/xnio/nio org/jboss/sasl org/jboss/marshalling org/jboss/marshalling/river"

for MODULE in $MODULES
do
    for JAR in `cd "$JBOSS_MODULEPATH/$MODULE/main/" && ls -1 *.jar`
    do
        CLASSPATH="$CLASSPATH:$JBOSS_MODULEPATH/$MODULE/main/$JAR"
    done
done

 

and modified this to the end, so we see what’s happening on launch:

 

    *)
            echo launchNbexec \
            --jdkhome '"$visualvm_jdkhome"' \
            --branding visualvm \
            --clusters '"$visualvm_clusters"' \
            -cp:a $CLASSPATH \
            ${visualvm_default_options} \
            '"$@"'
        eval launchNbexec \
            --jdkhome '"$visualvm_jdkhome"' \
            --branding visualvm \
            --clusters '"$visualvm_clusters"' \
            -cp:a $CLASSPATH \
            ${visualvm_default_options} \
            '"$@"'
        ;;

FIXING REMOTE HOST URI

Also found here that you must fix VM remove JMX URI:

 

So I start JMX with:

service:jmx:remoting-jmx://localhost:9999

 

It seems to work

 

Please check this as they describe how to do it in depth.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*
Website