6 Replies Latest reply on Feb 2, 2016 7:33 AM by ygogia

    How to connect to HornetQ using JConsole?

    cinto_qq

      Hi,

       

      I have installed HornetQ 2.0.0.GA on a Linux server, and was trying to connect to it using Jconsole. I am unable to do that.

       

      How can we connect HornetQ from our local pc to view?

       

      Thanks.

       

       

      Cinto

        • 1. Re: How to connect to HornetQ using JConsole?
          timfox

          Hmmm, let me see.

           

          How about RTFM?

          • 2. Re: How to connect to HornetQ using JConsole?
            jmesnil

            It's automatic:

             

            1. Start HornetQ server

            2. Open jconsole on the same machine

            3. Connect to the HornetQBootstrapServer process from jconsole dialog window

            • 3. Re: How to connect to HornetQ using JConsole?
              cinto_qq

              Hi Jeff,

               

              I am unable to run jconsole from the linux server. I tried to run jconsole from my pc, and then to connect it to the server, but is unable to do that, thus I am not sure if the settings I am using are correct or I need to 'unblock' any ports or sth.

               

              Currently, I am using this setting to connect: "servername:5445", with the default guest username and password. Is this the correct setting to connect to jconsole?

               

              Thanks.

               

               

              Cinto

              • 4. Re: How to connect to HornetQ using JConsole?
                mcleanl

                Hi Cinto,

                 

                Tim is quite right. Setting up jconsole has nothing to do with HornetQ. I can give you a few general instructions on where to start but you will need to search for specific informations for your specific environment.

                 

                1) You need to start the HornetQ JVM instance on the linux box with the following JMX options on your JVM

                 

                set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6000 
                -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false 
                
                
                

                 

                2) You then need to access HornetQ on the linux box from a remote pc using an access URL that looks like....

                 

                service:jmx:rmi:///jndi/rmi://localhost:6000/jmxrmi
                

                 

                Where localhost is swapped out for the IP address for your linux box.

                • 5. Re: How to connect to HornetQ using JConsole?
                  cinto_qq

                  Hi Luke,

                   

                  Thanks, I managed to connect HornetQ with JConsole.

                   

                   

                  Cinto

                  • 6. Re: How to connect to HornetQ using JConsole?
                    ygogia

                    Hi Cinto

                    Could please help me out with the steps you have undertaken to connect jconsole with hornetq

                    I am running hornetq as a standalone server and have added

                    set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6000  -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false 
                    

                     

                    to my run.sh

                    i have tried connecting using

                    <host>:<port>

                    as well as

                    service:jmx:rmi:///jndi/rmi://<host>:<port>/jmxrmi

                    in the remote connection field of jconsole, it shows connecting but never connects and fails after some time

                    infact my hornetq server shows connection established when i run for a brief moment

                    netstat -at | grep 6000

                    command.

                    Thank You