Reputation: 3
I am trying to connect via JConsole to ActiveMQ Artemis. However, it doesn't seem to work.
I have tried the following URLs both with and without user/password (admin/admin).:
service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
and
service:jmx:rmi:///jndi/rmi://0.0.0.0:1099/jmxrmi
My broker is running locally. I just unzipped it and created an instance. Here is my management.xml
:
<management-context xmlns="http://activemq.org/schema">
<connector connector-port="1099"/>
<authorisation>
<whitelist>
<entry domain="hawtio"/>
</whitelist>
<default-access>
<access method="list*" roles="amq"/>
<access method="get*" roles="amq"/>
<access method="is*" roles="amq"/>
<access method="set*" roles="amq"/>
<access method="*" roles="amq"/>
</default-access>
<role-access>
<match domain="org.apache.activemq.artemis">
<access method="list*" roles="amq"/>
<access method="get*" roles="amq"/>
<access method="is*" roles="amq"/>
<access method="set*" roles="amq"/>
<access method="*" roles="amq"/>
</match>
<!--example of how to configure a specific object-->
<!--<match domain="org.apache.activemq.artemis" key="subcomponent=queues">
<access method="list*" roles="view,update,amq"/>
<access method="get*" roles="view,update,amq"/>
<access method="is*" roles="view,update,amq"/>
<access method="set*" roles="update,amq"/>
<access method="*" roles="amq"/>
</match>-->
</role-access>
</authorisation>
</management-context>
I have tried the following:
<connector connector-port="1099"/>
in management.xml
fileartemis-service.xml
:
<!-- uncomment this if you want to connect jconsole to connect -->
<argument>-Dcom.sun.management.jmxremote</argument>
<argument>-Dcom.sun.management.jmxremote.port=1099</argument>
<argument>-Dcom.sun.management.jmxremote.ssl=false</argument>
<argument>-Dcom.sun.management.jmxremote.authenticate=false</argument>
artemis-service.xml
:
<argument>-Dcom.sun.management.jmxremote.rmi.port=1099</argument>
Upvotes: 0
Views: 1503
Reputation: 34973
I just got this working in ActiveMQ Artemis 2.6.2 by doing the following:
<ACTIVEMQ_HOME>
cd <ACTIVEMQ_HOME>/bin
./artemis create ~/testJMX --user myUser --pass myPass --require-login
<connector connector-port="1099"/>
in etc/management.xml
../artemis run
jconsole
command.service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
using myUser
& myPass
for the username & password respectively.I used JDK 1.8 on Linux. I don't have a Windows box I can test with.
It is also possible to get this working by changing steps #4 & #7 slightly:
<ACTIVEMQ_HOME>
cd <ACTIVEMQ_HOME>/bin
./artemis create ~/testJMX --user myUser --pass myPass --require-login
management-context
element in etc/management.xml
so that you're left only with this:
<management-context xmlns="http://activemq.org/schema" />
./artemis run
jconsole
command.In general, I recommend you move to the latest version. ActiveMQ Artemis 2.6.2 was released almost 3 years ago now. Since 2.6.2 was released the JMX properties have been removed from artemis-service.xml
as they are no longer applicable. See ARTEMIS-2112 for more details.
Upvotes: 1