cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ying Tang <ivytang0...@gmail.com>
Subject Connect to localhost is ok,but the ip fails.
Date Thu, 09 Sep 2010 08:06:21 GMT
I'm using cassandra 0.7 .
And in storage-conf .

# The address to bind the Thrift RPC service to
rpc_address: localhost
# port for Thrift to listen on
rpc_port: 9160

In my client , the code below works successfully.

        TSocket socket = new TSocket("localhost", 9160);
        TTransport trans =
Boolean.valueOf(System.getProperty("cassandra.framed", "true")) ? new
TFramedTransport(
                socket) : socket;
        trans.open();

But if i changed "localhost" to the localhost's ip , throws out the
"java.net.ConnectException: Connection refused".

And the connecting to other ip also fails.

-- 
Best regards,

Ivy Tang

Mime
View raw message