I am trying to access a remote Cassandra cluster using python cassandra-driver
like this:
cluster = Cluster(['192.168.19.1'], port=9042)
session = cluster.connect()
However, it gives me:
cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers',
'192.168.19.1': error(None, "Tried connecting to [('192.168.19.1', 9042)].
Last error: timed out")})
My Cassandra cluster on nodetool status
shows:
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 192.168.19.1 239,55 KiB 256 67,0% e45b9451-0081-4b12-9acb-1bc9 92953846 rack1
UN 192.168.19.2 263,95 KiB 256 63,8% 662df0f8-4209-4b06-9d46-f558 ad10ff0a rack1
UN 192.168.19.3 293,59 KiB 256 69,2% aa00fc80-6a8a-4bb0-8645-ef3f 58a72754 rack1
For example - my cassandra.yaml
parameters on the 192.168.19.1 host are as follows:
rpc_address: 192.168.19.1
listen_address: 192.168.19.1
native_transport_port: 9042
start_native_transport: true
What could be the reason of the problem?