简体   繁体   中英

Cassandra Cluster Setup Error : UnavailableException: Cannot achieve consistency level QUORUM

We're setting up 3 node Cassandra cluster in AWS.

We performed the below steps ;

1) On all 3 nodes, installed the latest version of Oracle JDK 1.8. On all 3 nodes, installed Cassandra 2.1.8. On all 3 nodes, located cassandra.yaml and set the following properties:

cluster_name: 'ABC'
authenticator: PasswordAuthenticator
authorizer: CassandraAuthorizer
write_request_timeout_in_ms: 5000

2) In the same file, set both "listen_address" and "rpc_address" to a permanent address of a host (the one which is not changed after Amazon VM restart). 3) In the same file, under "seed_provider" property, set "seeds" property to a permanent address of a host (the one which is not changed after Amazon VM restart) which is choosen to be the seed. 4) Save all changes and close the file. Also open the required ports in firewall. 5) Started Cassandra on all nodes one by one and confirmed that all nodes are up.

  • Problem :

Connected to node 1 and executed the below query

root@ip-10-181-119-112:/etc/cassandra/bin# ./cqlsh  -u cassandra -p  cassandra 10-181-119-112
Connected to Dev Cluster at 10-181-119-112:9042.
[cqlsh 5.0.1 | Cassandra 2.1.8 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.

cassandra@cqlsh> ALTER KEYSPACE system_auth WITH REPLICATION = { 'class': 'NetworkTopologyStrategy', 'us-east': 3 };

Tried to change the same on second node but I am not able to connect to second node facing below error.

root@ip-10-181-133-155:/etc/cassandra/bin# ./cqlsh -u cassandra -p cassandra 10-181-133-155
Connection error: ('Unable to connect to any servers', {'10-181-133-155': AuthenticationFailed(u'Failed to authenticate to 10-181-133-155: code=0100 [Bad credentials] message="org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level QUORUM"',)})

Please let me know what I am doing wrong here and help me in resolving this issue.

It seems like it can't read the authentication data for the default user. Try to nodetool repair the system_auth keyspace on all nodes. Also, make sure the datacenter name used in your replication settings ("us-east") matches what you see in nodetool status .

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM