Cassandra - Cannot achieve consistency level QUORUM

Follow the below steps:

  1. Set the authenticator in /etc/cassandra/cassandra.yaml file to AllowAllAuthenticator
  2. Restart the cassandra sudo service cassandra restart
  3. run the following commands cqlsh ALTER KEYSPACE system_auth WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
  4. Now change the authenticator again back to PasswordAuthenticator
  5. Restart the cassandra sudo service cassandra restart
  6. Now you will be able to login using the following command cqlsh -u cassandra -p cassandra

The issue is happening since a system_auth was set to {'class': 'NetworkTopologyStrategy', 'DC1': '1', 'DC2': '1'} previously, even though it was a single node cluster.


http://docs.datastax.com/en/datastax_enterprise/4.8/datastax_enterprise/sec/secConfiguringInternalAuthentication.html

The user 'cassandra' always uses QUORUM in system_auth per default. Try creating a different user (as superuser) and your problem should be gone.

The reason is that you cannot have QUORUM on a single node cluser, see Igors Anwser.


I managed to solve the problem.

I had to run ALTER KEYSPACE system_auth WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; as it was set to {'class': 'NetworkTopologyStrategy', 'DC1': '1', 'DC2': '1'} previously, even though it was a single node cluster.

This is why it couldn't achieve a QUORUM.


In 1-node (or 2-node) configurations QUORUM is impossible, and repair is not needed (as it's used to fix data inconsistencies between nodes)

Tags:

Cassandra