user3376961
user3376961

Reputation: 867

Not enough replica available for query at consistency LOCAL_ONE (1 required but only 0 alive)

I have 6 nodes in my cassandra cluster, all the nodes are up. My keyspace is set up as:

replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = true

Doing a read from this cass cluster gives me the error:

java.io.IOException: Exception during execution of SELECT "colA", "colB", "colC", "colD" FROM "keyspacename"."tablename" WHERE token("colA") > ? AND token("colA") <= ?  LIMIT 1 ALLOW FILTERING: Not enough replica available for query at consistency LOCAL_ONE (1 required but only 0 alive)

All my nodes are up with a replication factor of 1.. then what is causing this problem?

Also I can cqlsh and do "select" and "insert" in this table.

Anyone know whats going on?

Upvotes: 6

Views: 7850

Answers (1)

Aftab
Aftab

Reputation: 938

SimpleStrategy: Use for a single data center only. If you ever intend more than one data center, use the NetworkTopologyStrategy.

Or try running the same query with Consistency ONE, ALL, ANY, QUORUM. I mean not with LOCAL_*

Upvotes: 4

Related Questions