1

I am using the Cassandra driver for python in Spyder. I am trying to fetch some data from Cassandra table. Here is my code:

from cassandra.cluster import Cluster
cluster=Cluster(['some_ip'])
session=cluster.connect('some_key_space')
df_filtered_10m=session.execute("some query")

This is all working fine and I am getting the desired results. The problem is that in the console, this message is continuously popping up:

WARNING:cassandra.pool:Error attempting to reconnect to 10.0.10.91, scheduling retry in 256.0 seconds: [Errno None] Tried connecting to [('10.0.10.91', 9042)]. Last error: timed out

I have tried cluster.shutdown but it not working as well. How to get rid of it?

2
  • I also get the same warnings. I am using version 3.11.2 of cassandra, have installed it on AWS EC2 and accessing it via Python driver. I do get results back but frequently still get the warnings above. Any help will be appreciated. Commented Oct 4, 2018 at 20:49
  • Do you see this IP in the output of nodetool status on the one of the cluster nodes?
    – Alex Ott
    Commented Oct 21, 2018 at 12:08

1 Answer 1

0

I realise this is an old post but it keeps coming up in internet searches so I thought I'd respond.

The node involved either went down or was unresponsive at some point. The warning message is reported when the driver attempts to reconnect to the node but failed. In the instance posted above, the exception was due to a timeout indicating that the node is still either down or unresponsive.

Review the Cassandra logs on the problematic node, focusing on messages around the time (within a few seconds) that the reconnection warning message was reported by the driver for clues as to the cause of the reconnection timeout. Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.