acimutal
acimutal

Reputation: 2245

Cassandra NoHostAvailableException

I have no problems when connecting to my cassandra 1.2.8 cluster inside of my local network by using Datastax Java driver. Out of my local network I get the NoHostAvailableException exception. I've checked 9160 port is up and mapped from router to the server. Could you help me with any other posible cause?

Thanks

Upvotes: 2

Views: 1959

Answers (1)

doanduyhai
doanduyhai

Reputation: 8812

Port 9160 is the default port for RPC connection (Thrift).

If you are using Datastax java driver, you should edit the cassandra.yaml config file and set

start_native_transport = true
native_transport_port = 9042 //Default port for CQL binary protocol

When bootstraping the cluster object for Datastax java driver, you should set port to 9042

Upvotes: 4

Related Questions