I get an error with cassandra Authenticator. cqlsh return me this error after I changed the value "authenticator" in cassandra.yaml file:
Connection error: (‘Unable to connect to any servers’, {’127.0.0.1’: AuthenticationFailed(‘Failed to authenticate to 127.0.0.1: Error from server: code=0100 [Bad credentials] message=“org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level QUORUM’“)})
here is the command I ran step by step:
sudo apt-get install cassandra
cqlsh
ALTER KEYBASE system_auth with REPLICATION = { 'class' : 'NetworkTopologyStrategy',
‘dc1’: 3 }*// dans cqlsh
//replace AllowAllAuthenticator by PasswordAuthenticator in cassandra.yaml
sudo service cassandra restart
cqlsh -u cassandra -p cassandra
Connection error: (‘Unable to connect to any servers’, {’127.0.0.1’: AuthenticationFailed(‘Failed to authenticate to 127.0.0.1: Error from server: code=0100 [Bad credentials] message=“org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level QUORUM’“)})
I follow this part Configuration authentication
here is my configuration:
[cqlsh 5.0.1 | Cassandra3.0.9 | CQL spec 3.4.0 | Native protocol v4] Ubuntu 16.04.1
Any ideas ?
Thanks a lot :)
If you have a 1 node cluster and a replication factor of 3 in a DC you cannot achieve quorum consistency (over half of 3 is 2 but theres only 1 node). System auth requires quorum so change your RF to 1. Also possible your nodes are not actually in "dc1" so there is no replicas. Include your nodetool status
and it will help identify how many nodes in each DC.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.