Reputation: 3462
I am using ActiveMQ 5.16.1 on Windows. I set useJmx="true"
in the <broker>
section of activemq.xml
. However, after starting ActiveMQ nothing is listening on the default JMX port 1099
, and JConsole does not show ActiveMQ as a target.
I tried explicitly enabling the JMX connector in activemq.xml
:
<managementContext>
<managementContext createConnector="true"/>
</managementContext>
However, I get this failure in the ActiveMQ startup console:
WARN | Failed to start JMX connector Port already in use: 1099; nested exception is:
java.net.BindException: Address already in use: JVM_Bind. Will restart management to re-create JMX connector, trying to remedy this issue.
This returns an empty result
netstat -an | grep 1099
Upvotes: 1
Views: 380
Reputation: 4316
JMX is most likely already running via the startup script-- hence the error message. I'm betting the netstat -na is run after the ActiveMQ process has given you the error and the process has already exited.
This is a confusing bit-- that setting in managementContext should be createConnector="false" when using the Apache ActiveMQ build.
Background: ActiveMQ is essentially a library, so it has features to support running in all sorts of different ways. When you start ActiveMQ from the Apache build download, the JMX settings are usually started using -D parameters found in the bin/setenv script. The managementContext setting is to instruct ActiveMQ s embedded in a different runtime/build that does not start JMX itself.
Upvotes: 1