Problems connecting to Cassandra pool from Spring application
A pitty, that no one seems to know of this kind of problem. After several attempts and searches on the Internet (where I found close to nothing on this particular problem) I was almost giving up on the idea.
But.
Then two things came to my attention:
- The replication factor for my test keyspace was 3, while I only had two nodes. Not very sensible.
- If I had looked closly to the exception, I would have seen, that this is a warning and not a fatal error.
So what?
I was still able to connect to the cluster and actually query it, but always gave up too early because of this exception.
Almost "Much Ado About Nothing".
Everything's now working so far and I could further develop my applciation. As well as learn a lot about this high availability NoSQL database and where it differes from "classic" relational database, even if the query language has many similarities. It's quite exiting!
So: Sorry for the fuss!
Cheers, Daniel
I tried reading more about the issue you have faced since I was facing the same issue. I had a cluster of 4 nodes and I was encountering an issue for one of the nodes. I did the below two steps to avoid getting this error -
- Removed the particular failing node from the node list which I was passing whie creating cassandra cluster in my java class.
- Removed the node from my cluster configuration in cassandra. #1 will not make any changes unless node has been removed from the cluster.
Reversibly, you should actually be fixing the node if it's down and cannot be started. If the node is not required, it should be removed from the cluster and it shall not pop up as a warning while starting the service. I guess, Cassandra needs a permanent fix for this issue (warning) since if the node is down, it shall not be required to create a session. On the otherhand, its just a warning and can be ignored if nothing looks suspicious for your application.