2 Replies Latest reply on Jun 12, 2012 3:27 PM by thebravedave

    Configuring JMX with VisualVM Using Jboss 7

    thebravedave

      Hello, I am having a problem.

      I am using visualvm to analyze my projects that I have running on jboss 7.

      In order to use the sampler section of visualvm visualvm has to make a JMX connection to jboss.

       

      I have JMX set up properly. I know this because I have user interfaces set up to make remote JMX mbean calls. These are functioning properly.

       

      I tried adding a JMX connection to my server through visual vm.  I tried making the connection the same way I make remote JMX mbean calls.

       

      The security credentials are the same that allow me to make my remote JMX mbean calls successfully.

       

      I blacked out our server's hostname for security reasons.

       

      error1.bmp

      error2.bmp

       

      This is the error message that was in my server logs when I tried to set up JMX for visualvm:

       

      2012-06-11 15:59:55,960 ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of -2140864253

       

      I also tried the more simplified way of creating a jmx connection with visualvm as such:

       

      error3.bmp

      error4.bmp

      And the Jboss logs gave me:

      2012-06-11 16:19:15,418 ERROR [org.jboss.remoting.remote.connection] JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of -2140864253

       

       

      In order to get JMX mbeans to work properly I had to add jboss-client.jar to the project that was trying to make the remote JMX mbean call.

      Is it possible that VisualVM is just not set up to make the call since its not using jboss-client.jar. (might be a silly question).

       

      Please help.

       

      David

        • 1. Re: Configuring JMX with VisualVM Using Jboss 7
          jaysensharma

          Hi David,

           

                       Can you try the Special Shell Script (visualvm.sh    Developed by “Mr. John O\’Hara)  mentioned in http://middlewaremagic.com/jboss/?p=1940   link to connect VisualVM with JBossAS7.

          • 2. Re: Configuring JMX with VisualVM Using Jboss 7
            thebravedave

            I fixed the problem by using this other script that adds the dependencies required for a remote jmx call for jboss 7 to visualvm.

            The project can be found here:    https://github.com/johnaoahra80/jboss-as-tool-integration

             

            Basically, when you run the script and you have VISUALVM_HOME and JBOSS_HOME set, it will open up visualvm for you with the neccesary dependencies already added to visualvm's classpath.

             

            After visualvm is running add a remote connection. Then right click on that connection and choose "Add JMX Connection".

            You will then be prompted with the JMX configuration information.

            For connection you have to put in the new jboss 7 remote jmx connection configuration

             

            It's set up like this:       service:jmx:remoting-jmx://YOURSERVERHOSTNAME:9999

            Then put in security credentials if you have them configured on the server.

             

            Hope this helps someone.

             

            dave