0
votes

I'm trying to connect the cassandra cpp-driver with 2 node cassandra cluster. It is throwing some error, but able to retrieve the keyspace names.

1430309809.995 [ERROR] (src/connection.cpp:413:static void cass::Connection::on_connect(cass::Connector*)): Connect error 'connection refused' on host 192.168.1.5

1430309809.995 [ERROR] (src/connection.cpp:651:void cass::Connection::notify_error(const string&)): Host 192.168.1.5 had the following error on startup: 'Unable to connect'

keyspace_name: 'mytest'

keyspace_name: 'system_traces'

keyspace_name: 'system'

2

2 Answers

0
votes

It looks like your host 192.168.1.5 is not configured to accept the external connections but your driver is able to connect to the second node in the cluster.

0
votes

I found the solution for it. My bad, i had set the broadcast_rpc_address to the client ip, that's the reason i got such an error. Now i changed the broadcast_rpc_address to the ip of the same machine. It works fine now.