tags:

views:

50

answers:

1

When i am using Cassandra's nodetool to see the ring of a remote host (use IP address), it gives following error, how to make this work? BTW - I can ping that host using IP address.

root@ServerA:~/cassandra# bin/nodetool -h 172.24.0.10 ring
Error connecting to remote JMX agent!
java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
        at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
        at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2343)
        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:296)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
        at org.apache.cassandra.tools.NodeProbe.connect(NodeProbe.java:106)
        at org.apache.cassandra.tools.NodeProbe.(NodeProbe.java:82)
        at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:405)
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at java.net.Socket.(Socket.java:392)
        at java.net.Socket.(Socket.java:206)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
        ... 10 more
+1  A: 

You need to enable remote JMX:

To enable monitoring and management from remote systems, set this system property when you start the JVM: com.sun.management.jmxremote.port=portNum

Schildmeijer
Hi Schildmeijer, after I run the command, it says:root@ServerA:~/cassandra# java -Dcom.sun.management.jmxremote.port=8080Error: Password file read access must be restricted: /usr/lib/jvm/java-6-openjdk/jre/lib/management/jmxremote.password Sorry, I am new to linux and java.
Andy Wan