Monitoring ActiveMQ Using JMX Over SSH

13 thoughts on “Monitoring ActiveMQ Using JMX Over SSH”

  1. Beauty, mate! I’ve wresting with this for too long. The missing link for me was the “-Djava.rmi.server.hostname=127.0.0.1″ switch. Most of the documentation I’ve seen was for running JConsole on the same machine as ActiveMQ, and I’m trying to do it remotely. Popped in my server’s name in place of 127.0.0.1, and wammo! Thanks for posting your pain.

  2. Hi,

    I’m with you if you report the lack of documentation. My additional info here is to set the port differently by disallowing AMQ to create the connector:

    Instead, you let the connector be created explicitly by the JVM using (example):
    -Dcom.sun.management.jmxremote.port=11119
    -Dcom.sun.management.jmxremote.authenticate=true
    -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_BASE}/conf/jmx.password
    -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_BASE}/conf/jmx.access
    (in the bin/activemq)

    That’s how I got around this issue. This is also the solution to enable authentication/authorization if you want to avoid people to connect to your management console and mess around.

    Cheers,
    Felix

  3. Sorry, forgot that tags have to be treated specially :

    to disallow AMQ to create the connector :
    <managementContext>
    <managementContext createConnector=”false” />
    </managementContext>

    1. Hi,

      but what about the firewall. In this case your second port will not be fixeb, it will be negociated at runtime which is not ok for firewall.
      How do you avoid this problem ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s