I'm running a single node at the moment. I'm trying to enable password authentication for Cassandra.
I'm following this guide: http://cassandra.apache.org/doc/latest/operating/security.html#password-authentication
I'll note that I didn't alter system_auth
's replication as it's a single node cluster.
I edited cassandra.yaml
to use authenticator: PasswordAuthenticator
.
I then restarted cassandra and tried the command cqlsh -u cassandra -p cassandra
, but that gives me the error:
Connection error: ('Unable to connect to any servers',
{'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1:
code=0100 [Bad credentials] message="org.apache.cassandra.exceptions.
UnavailableException: Cannot achieve consistency level QUORUM"',)})
I've tried running nodetool repair
but it says: Replication factor is 1. No repair is needed for keyspace 'system_auth'
How do I solve this?
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.
Follow the below steps:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With