通过JMX API监控ActiveMQ

时间:2014-03-25 21:06:10

标签: java linux activemq

我试图通过JMX监控ActiveMQ我添加了以下内容,以启用JXM到我的启动脚本。

# **** Uncomment to enable jmx ****
wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false

我尝试使用此工具测试连接cmdline-jmxclient-0.10.3.jar为JXM提供类似telnet的接口

# java -jar cmdline-jmxclient-0.10.3.jar - 10.10.130.111:1616

Exception in thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 10.10.130.111; nested exception is:
    java.net.ConnectException: Connection refused]
    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:355)
    at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)
    at org.archive.jmx.Client.execute(Client.java:225)
    at org.archive.jmx.Client.main(Client.java:154)
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: 10.10.130.111; nested exception is:
    java.net.ConnectException: Connection refused]
    at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118)
    at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203)
    at javax.naming.InitialContext.lookup(InitialContext.java:409)
    at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1915)
    at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1884)
    at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:289)

即使认证设置为false,我也会遇到连接异常。

Netstat向所有可用接口显示其列表& iptables / SELinux被禁用

#netstat -ntlp 

tcp        0      0 ::ffff:10.10.130.111:61616  :::*      LISTEN      29917/java

非常感谢任何帮助

0 个答案:

没有答案