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

You are likely getting this error because the Replication Factor of the keyspace the table you are querying belongs to has a Replication Factor of one, is that correct?

If the partition you are reading / updating does not have enough available replicas (nodes with that data) to meet the consistency level, you will get this error.

If you want to be able to handle more than 1 node being unavailable, what you could do is look into altering your keyspace to set a higher replication factor, preferably three in this case, and then running a nodetool repair on each node to get all of your data on all nodes. With this change, you would be able to survive the loss of 2 nodes to read at a consistency level of one.

This cassandra parameters calculator is a good reference for understanding the considerations of node count, replication factor, and consistency levels.

Leave a Comment