1 Reply Latest reply on Jan 25, 2012 1:15 PM by jsherman

    JMX Remote Connection

    yannick_yr.inscription

      Hello all,

       

      I try to connect to my activemq-broker, using JConsole. But JConsole always return "connection failed".

       

      I try to connect with the JMX URL:

      service:jmx:rmi:///jndi/rmi://:1099/karaf-root

      log: smx

      pass: smx

       

      Looking at the log, i see that the connection is opened, then closed few seconds later:

      10:27:45,028 | DEBUG | heckpoint Worker | MessageDatabase                  | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | Checkpoint done.

      10:27:48,045 | DEBUG | n(25)-10.70.0.50 | tcp                              |  -  -  | RMI TCP Connection(25)-10.70.0.50: accepted socket from

      10:27:48,053 | DEBUG | n(25)-10.70.0.50 | tcp                              |  -  -  | RMI TCP Connection(25)-10.70.0.50: (port 1099) op = 80

      10:27:49,274 | DEBUG | roker] Scheduler | Queue                            | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | queue://camel.timer expiring messages ..

      10:27:49,275 | DEBUG | roker] Scheduler | Queue                            | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | camel.timer toPageIn: 0, Inflight: 0, pagedInMessages.size 0, enqueueCount: 0, dequeueCount: 0

      10:27:49,275 | DEBUG | roker] Scheduler | Queue                            | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | queue://camel.timer expiring messages done.

      10:27:49,338 | DEBUG | roker] Scheduler | Queue                            | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | queue://camel.timer expiring messages ..

      10:27:49,338 | DEBUG | roker] Scheduler | Queue                            | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | camel.timer toPageIn: 0, Inflight: 0, pagedInMessages.size 0, enqueueCount: 0, dequeueCount: 0

      10:27:49,338 | DEBUG | roker] Scheduler | Queue                            | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | queue://camel.timer expiring messages done.

      10:27:50,030 | DEBUG | heckpoint Worker | MessageDatabase                  | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | Checkpoint started.

      10:27:50,038 | DEBUG | heckpoint Worker | MessageDatabase                  | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | Checkpoint done.

      10:27:55,041 | DEBUG | heckpoint Worker | MessageDatabase                  | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | Checkpoint started.

      10:27:55,048 | DEBUG | heckpoint Worker | MessageDatabase                  | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | Checkpoint done.

      10:28:00,050 | DEBUG | heckpoint Worker | MessageDatabase                  | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | Checkpoint started.

      10:28:00,058 | DEBUG | heckpoint Worker | MessageDatabase                  | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | Checkpoint done.

      10:28:03,063 | DEBUG | n(25)-10.70.0.50 | tcp                              |  -  -  | RMI TCP Connection(25)-10.70.0.50: (port 1099) connection closed

      10:28:03,063 | DEBUG | n(25)-10.70.0.50 | tcp                              |  -  -  | RMI TCP Connection(25)-10.70.0.50: close connection

      10:28:05,059 | DEBUG | heckpoint Worker | MessageDatabase                  | 53 - org.apache.activemq.activemq-core - 5.5.1.fuse-01-13 | Checkpoint started.

       

       

      I didn't found any solution in this forum. I just saw that no specific configuration is needed. right?

       

      I tried to add useJmx="true" in my spring broker configuration.

      I tried also to modify the bin/start file, adding 

      -Dcom.sun.management.jmxremote \

      -Dcom.sun.management.jmxremote.port=1099 \

      -Dcom.sun.management.jmxremote.authenticate=false \

      -Dcom.sun.management.jmxremote.ssl=false \

      But without success.

       

      Please, can you help me to find what is wrong?

      Thanks a lot

        • 1. Re: JMX Remote Connection
          jsherman

          Have you had a look at the following documentation: http://activemq.apache.org/jmx.html

           

          What version of the broker are you using?

          Is this a standalone broker or is it running in a OSGi container?

          Did you change the default jmx url to use the /karaf-root?

          Did you enable security to use a password?

           

          In JConsole the broker should be listed in the Local Processes as

          run.jar start

           

          If you hover over the process you should see the full path.

           

          If you dont see the broker listed then you can connect to remotely by enabling the following JMX config in the activemq start script:

           

          ACTIVEMQ_SUNJMX_START="-Dcom.sun.management.jmxremote.port=11099"

          ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false"

          #ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=$/jmx.password" #ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=$/jmx.access"

          ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false"

          #ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote"

           

          Then you would use the following URL to connect:

           

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

           

          Jason