Maki,

Yes you are right, 8081 is mx4j port, the JMX_PORT is 8001 in the cassandra-env.sh.

in the cassandra Linux server itself, I can run this successfully:
nodetool -host xxxxx -p 8001 ring
xxxxx is the actually IP address

however when I run the same command in another windows machine(which has the cassandra windows version extracted), I am getting exception like below, one thing puzzled me is that the command trying to connect to ip xxxxx, but the exception claimed: "Connection refused to host: 127.0.0.1". Is there anything else that I need to config or...? I guess this is probably the reason that jconsole can't connect to port 8001 remotely either? Thanks for any advice!

D:\apache-cassandra-0.7.4\bin>nodetool -host xxxxx -p 8001 ring
Starting NodeTool
Error connection to remote JMX agent!
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
       java.net.ConnectException: Connection refused: connect
       at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
       at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
       at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
       at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source) at javax.management.remote.rmi.RMIConnector.getConnection(Unknown Source)
       at javax.management.remote.rmi.RMIConnector.connect(Unknown Source)
at javax.management.remote.JMXConnectorFactory.connect(Unknown Source)
       at org.apache.cassandra.tools.NodeProbe.connect(NodeProbe.java:137)
       at org.apache.cassandra.tools.NodeProbe.<init>(NodeProbe.java:107)
       at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:511)
Caused by: java.net.ConnectException: Connection refused: connect
       at java.net.PlainSocketImpl.socketConnect(Native Method)
       at java.net.PlainSocketImpl.doConnect(Unknown Source)
       at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
       at java.net.PlainSocketImpl.connect(Unknown Source)
       at java.net.SocksSocketImpl.connect(Unknown Source)
       at java.net.Socket.connect(Unknown Source)
       at java.net.Socket.connect(Unknown Source)
       at java.net.Socket.<init>(Unknown Source)
       at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
       ... 11 more



-----Original Message----- From: Watanabe Maki
Sent: Saturday, April 16, 2011 1:45 AM
To: user@cassandra.apache.org
Cc: <user@cassandra.apache.org>
Subject: Re: cluster IP question and Jconsole?

8081 is your mx4j port, isn't it? You need to connect jconsole to JMX_PORT specified in cassandra-env.sh.

maki

From iPhone


On 2011/04/16, at 13:56, tinhuty he <tinh...@hotmail.com> wrote:

Maki, thanks for your reply. for the second question, I wasn't using the loopback address, I was using the actually IP address for that server. I am able to telnet to that IP on port 8081, but using jconsole failed.

-----Original Message----- From: Maki Watanabe
Sent: Friday, April 15, 2011 9:43 PM
To: user@cassandra.apache.org
Cc: tinhuty he
Subject: Re: cluster IP question and Jconsole?

127.0.0.2 to 127.0.0.5 are valid IP addresses. Those are just alias
addresses for your loopback interface.
Verify:
% ifconfig -a

127.0.0.0/8 is for loopback, so you can't connect this address from
remote machines.
You may be able configure SSH port forwarding from your monitroing
host to cassandra node though I haven't try.

maki

2011/4/16 tinhuty he <tinh...@hotmail.com>:
I have followed the description here
http://www.edwardcapriolo.com/roller/edwardcapriolo/entry/lauching_5_node_cassandra_clusters
to created 5 instances of cassandra in one CentOS 5.5 machine. using
nodetool shows the 5 nodes are all running fine.

Note the 5 nodes are using IP 127.0.0.1 to 127.0.0.5. I understand 127.0.0.1 is pointing to local server, but how about 127.0.0.2 to 127.0.0.5? looks to
me that they are not valid IP? how come all 5 nodes are working ok?

Another question. I have installed MX4J in instance 127.0.0.1 on port 8081. I am able to connect to http://server:8081/ from the browser. However how do
I connect using Jconsole that was installed in another windows
machines?(since my CentOS5.5 doesn't have X installed, only SSH allowed).

Thanks.

Reply via email to