Are you running nodetool on the host, or on a remote machine? 

If local, does "netstat -n" show that you are listening on the JMX port?

If remote, have you added the JMX port to your security group?


On Tue, Mar 01, 2011 at 12:54:13AM -0600, Himanshi Sharma wrote:
> Peter,
> 
> I build Cassandra after making changes as per ur patch. Nw when try
> nodetool i get this exception.
> 
> 
> [root@ip-10-170-153-71 bin]#  ./nodetool -h 175.41.143.192 ring
> 
> Error connection to remote JMX agent!
> java.rmi.ConnectException: Connection refused to host: 10.130.62.177;
> nested exception is:
>         java.net.ConnectException: Connection timed out
>         at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
>         at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
>         at
> sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
>         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
>         at
> javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
>         at
> javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2327)
>         at
> javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:279)
>         at
> javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
>         at
> org.apache.cassandra.tools.NodeProbe.connect(NodeProbe.java:110)
>         at org.apache.cassandra.tools.NodeProbe.<init>(NodeProbe.java:86)
>         at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:476)
> Caused by: java.net.ConnectException: Connection timed out
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
>         at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:529)
>         at java.net.Socket.connect(Socket.java:478)
>         at java.net.Socket.<init>(Socket.java:375)
>         at java.net.Socket.<init>(Socket.java:189)
>         at
> sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
>         at
> sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
>         at
> sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
>         ... 10 more
> 
> 
> Himanshi Sharma
> 
> 
> 
> 
> From:
> Peter Fales <peter.fa...@alcatel-lucent.com>
> To:
> "dev@cassandra.apache.org" <dev@cassandra.apache.org>
> Date:
> 02/28/2011 06:25 PM
> Subject:
> Re: Cassandra nodes on EC2 in two different regions not communicating
> 
> 
> 
> Are you sure you actually re-built Cassandra after making those source
> code changes?   I believe "Cannot assign requested address" is the error
> you
> get with the official Cassandra because the external IP address is
> not the actual address of an adapter.   The patches change the code
> so that it listens on all interfaces (so it should not actually be
> requesting a specific address)
> 
> On Mon, Feb 28, 2011 at 06:23:53AM -0600, Himanshi Sharma wrote:
> > Hi Peter,
> >
> > I made changes as per ur patch. Still its nt working. Using external ip
> in
> > Listen addr gives this exception.
> >
> > ERROR 11:47:14,092 Exception encountered during startup.
> > java.net.BindException: Cannot assign requested address
> >         at sun.nio.ch.Net.bind(Native Method)
> >         at
> >
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
> >         at
> > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
> >         at
> > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
> >         at
> >
> org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
> >         at
> >
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
> >         at
> >
> org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
> >         at
> >
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> > Exception encountered during startup.
> > java.net.BindException: Cannot assign requested address
> >         at sun.nio.ch.Net.bind(Native Method)
> >         at
> >
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
> >         at
> > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
> >         at
> > sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:70)
> >         at
> >
> org.apache.cassandra.net.MessagingService.listen(MessagingService.java:138)
> >         at
> >
> org.apache.cassandra.service.StorageService.initServer(StorageService.java:319)
> >         at
> >
> org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:99)
> >         at
> >
> org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:177)
> >
> > So i kept them blank. Cassandra runs. Bt still not showing nodes of
> other
> > regions in nodetool cmd, whereas i am able to ping and telnet.
> >
> > Thanks,
> > Himanshi Sharma
> >
> >
> >
> >
> > From:
> > Peter Fales <peter.fa...@alcatel-lucent.com>
> > To:
> > "dev@cassandra.apache.org" <dev@cassandra.apache.org>
> > Date:
> > 02/24/2011 06:44 PM
> > Subject:
> > Re: Cassandra nodes on EC2 in two different regions not communicating
> >
> >
> >
> > I sent a note mentioning this yesterday and referring to my post from
> > last September. See:
> > http://www.mail-archive.com/user@cassandra.apache.org/msg05692.html
> >
> > On Thu, Feb 24, 2011 at 07:04:03AM -0600, Himanshi Sharma wrote:
> > > Peter,
> > >
> > > Please tell me the options. I m new to cassandra and definitely want
> to
> > > try out.
> > >
> > > Thanks,
> > > Himanshi
> > >
> > >
> > >
> > >
> > > From:
> > > Peter Fales <peter.fa...@alcatel-lucent.com>
> > > To:
> > > "dev@cassandra.apache.org" <dev@cassandra.apache.org>
> > > Date:
> > > 02/24/2011 06:30 PM
> > > Subject:
> > > Re: Cassandra nodes on EC2 in two different regions not communicating
> > >
> > >
> > >
> > > It's pretty easy to do if you're willing/able to make some small
> changes
> > > to the Cassandra code.   Is that an option?
> > >
> > > On Thu, Feb 24, 2011 at 06:52:24AM -0600, Himanshi Sharma wrote:
> > > > Hi All,
> > > >
> > > > I am trying to configure a cassandra cluster of 2 nodes in different
> 
> > > > regions of amazon ec2.
> > > >
> > > > Nodes are running fine but when i try nodetool command with ring
> > option
> > > i
> > > > get single node.
> > > >
> > > > And  both the nodes are able to ping each other, telnet each other.
> > Not
> > > > able to figure out what is the problem.
> > > >
> > > > Plz help
> > > >
> > > > Thanks,
> > > > Himanshi Sharma
> > > >
> > > > =====-----=====-----=====
> > > > Notice: The information contained in this e-mail
> > > > message and/or attachments to it may contain
> > > > confidential or privileged information. If you are
> > > > not the intended recipient, any dissemination, use,
> > > > review, distribution, printing or copying of the
> > > > information contained in this e-mail message
> > > > and/or attachments to it are strictly prohibited. If
> > > > you have received this communication in error,
> > > > please notify us by reply e-mail or telephone and
> > > > immediately and permanently delete the message
> > > > and any attachments. Thank you
> > > >
> > >
> > > --
> > > Peter Fales
> > > Alcatel-Lucent
> > > Member of Technical Staff
> > > 1960 Lucent Lane
> > > Room: 9H-505
> > > Naperville, IL 60566-7033
> > > Email: peter.fa...@alcatel-lucent.com
> > > Phone: 630 979 8031
> > >
> > >
> > > =====-----=====-----=====
> > > Notice: The information contained in this e-mail
> > > message and/or attachments to it may contain
> > > confidential or privileged information. If you are
> > > not the intended recipient, any dissemination, use,
> > > review, distribution, printing or copying of the
> > > information contained in this e-mail message
> > > and/or attachments to it are strictly prohibited. If
> > > you have received this communication in error,
> > > please notify us by reply e-mail or telephone and
> > > immediately and permanently delete the message
> > > and any attachments. Thank you
> > >
> >
> > --
> > Peter Fales
> > Alcatel-Lucent
> > Member of Technical Staff
> > 1960 Lucent Lane
> > Room: 9H-505
> > Naperville, IL 60566-7033
> > Email: peter.fa...@alcatel-lucent.com
> > Phone: 630 979 8031
> >
> >
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain
> > confidential or privileged information. If you are
> > not the intended recipient, any dissemination, use,
> > review, distribution, printing or copying of the
> > information contained in this e-mail message
> > and/or attachments to it are strictly prohibited. If
> > you have received this communication in error,
> > please notify us by reply e-mail or telephone and
> > immediately and permanently delete the message
> > and any attachments. Thank you
> >
> 
> --
> Peter Fales
> Alcatel-Lucent
> Member of Technical Staff
> 1960 Lucent Lane
> Room: 9H-505
> Naperville, IL 60566-7033
> Email: peter.fa...@alcatel-lucent.com
> Phone: 630 979 8031
> 
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
> 

-- 
Peter Fales
Alcatel-Lucent
Member of Technical Staff
1960 Lucent Lane
Room: 9H-505
Naperville, IL 60566-7033
Email: peter.fa...@alcatel-lucent.com
Phone: 630 979 8031

Reply via email to