Hi Jack, thanks a million! You saved my life :-) I changed ThriftAddress from localhost to the server domain name and it now works perfectly!
-Weijun -----Original Message----- From: Jack Culpepper [mailto:jackculpep...@gmail.com] Sent: Tuesday, February 09, 2010 1:12 AM To: cassandra-user@incubator.apache.org Subject: Re: Unable connect Thrift client to cassandra remotely (connection refused) Read the Miscellaneous section of this page: http://wiki.apache.org/cassandra/StorageConfiguration The default config binds only to localhost. You have to change <ThriftAddress> if you want to connect remotely. Best, Jack On Tue, Feb 9, 2010 at 1:06 AM, Weijun Li <weiju...@gmail.com> wrote: > Hello, > > > > I installed Cassandra 0.50 and started the instance without any problem. > The problem is: if I run > > > > bin/cassandra-cli --host localhost -port 9160 > > > > it worked perfectly. > > > > But whenever I tried to connect from any non-localhost and non-127.0.0.1 > address (from other server or same server with domain name), I got > connection refused, --no matter how I open port, disable firewall or > change port number. > > > > So is there any default restriction in Cassandra that doesnt allow > non-localhost client connection? How can I get Cassandra-cli to work > remotely on an Cassandra instance? Also it seems to have same issue for > nodeprobe. > > > > -bash-3.1# bin/cassandra-cli --host [xxxx-hostname] -port 9160 > > Exception java.net.ConnectException: Connection refused > > org.apache.thrift.transport.TTransportException: java.net.ConnectException: > Connection refused > > at org.apache.thrift.transport.TSocket.open(TSocket.java:185) > > at org.apache.cassandra.cli.CliMain.connect(CliMain.java:65) > > at org.apache.cassandra.cli.CliMain.main(CliMain.java:151) > > Caused by: java.net.ConnectException: Connection refused > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) > > at > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) > > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) > > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) > > at java.net.Socket.connect(Socket.java:519) > > at java.net.Socket.connect(Socket.java:469) > > at org.apache.thrift.transport.TSocket.open(TSocket.java:180) > > ... 2 more > > > > Thanks, > > -Weijun