Rajesh
Rajesh

Reputation: 1620

Not able to fetch values from Cassandra using DataStax C# Driver

I have a Cassandra Database and recently I had added a second node with it.I have a old application developed in C#.net and backend as Cassandra which was developed during only one node was present its is connecting to the DB and fetching the values via Datastax C# Driver even though when there are two node present now.

But When I Create a new application in C#.net to the Cassandra now with two nodes via Datastax C# Driver its is connecting and I am getting session but when I try to fetch the values from the DB I am getting this error

Not enough replicas available for query at consistency LocalQuorum (2 required but only 1 alive)

Do I have to change anything in the Cassandra Config(cassandra.yaml) file in order to connect new applications.

I am struck with the problem for days.Kindly anyoneone point me what to do to solve this issue.

Edit: I am getting this issue only on new version Datastax Cassandra C# Driver V.3.0.0.1 - Beta - 1 when I removed this reference and added Datastax Cassandra C# Driver V.2.7.1 I didn't get the error.But this may not be root cause of this issue I am still searching for the root cause and solution for it.

Upvotes: 4

Views: 458

Answers (1)

Aaron
Aaron

Reputation: 57798

When you added your node did you also increase your replication factor (RF)?

The biggest problem I see is that you are running a two node cluster and querying at quorum.

Don't do this

In this scenario, you can only tolerate a single node being unavailable (as you are seeing).

enter image description here

Quorum of 2 == 2. So if you only have 2 nodes, then quorum only works if both nodes are running and if your keyspace has an RF of 2. There is no tolerance for node failure in this scenario.

Seriously, don't do this. Query at LOCAL_ONE instead.

Upvotes: 1

Related Questions