Search code examples
cassandradatastaxdatastax-enterprisecassandra-3.0cqlsh

how to degrade cassandra cluster to standalone


I have setup cassandra cluster with two nodes, node1 and node2. node1 is the seed node.

I would like to decommission node2 from the cluster.

system auth config

KEYSPACE system_auth WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '2'}  AND durable_writes = true;

I have changed the config of my keyspace my_data from below

KEYSPACE my_data WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '2'}  AND durable_writes = true;

to

KEYSPACE my_data WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '1'}  AND durable_writes = true;

After changing the config, I have run a full repair on system_auth and my_data.

After decommissioning node2 using nodetool -h node2 -pw somepassword -u someuser decommission, I am getting the below error while connecting to node1 through cqlsh.

Connection error: ('Unable to connect to any servers', {'node1': AuthenticationFailed('Failed to authenticate to node1: Error from server: code=0100 [Bad credentials] message="org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level QUORUM"',)})

I am using the same credentials but cannot log in. Can you please suggest the correct config to be changed and the process to do that?


Solution

    1. After decommissioning node2, I have removed authentication to Cassandra server restarted the server.
    2. This allowed me to connect to Cassandra, after that I have changed system_auth keyspace topology to SimpleStrategy with replication_factor of 1. Then I have repaired the system_auth keyspace
    3. Then restarted Cassandra server and repaired the system_auth keyspace again.
    4. Now I can connect with username and password.

    Remove authentication process

    authenticator: AllowAllAuthenticator
    authorizer: AllowAllAuthorizer
    

    Commands:-

    nodetool -h nodetool -pw somepassword -u someuser decommission
    nodetool repair system_auth