Cassandra集群设置错误:UnavailableException:无法实现一致性级别QUORUM [英] Cassandra Cluster Setup Error : UnavailableException: Cannot achieve consistency level QUORUM

查看:4660
本文介绍了Cassandra集群设置错误:UnavailableException:无法实现一致性级别QUORUM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在AWS中设置3个节点Cassandra群集。

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

我们执行以下步骤;

1)在所有3个节点上,安装了最新版本的Oracle JDK 1.8。
在所有3个节点上,安装了Cassandra 2.1.8。
在所有3个节点上,位于cassandra.yaml并设置以下属性:

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)在同一文件中,将listen_address和rpc_address设置为主机的永久地址(在Amazon VM重新启动后不更改的地址)。
3)在同一个文件中,在seed_provider属性下,将seeds属性设置为主机的永久地址(在Amazon VM重新启动后不更改的地址),该地址被选择为种子。
4)保存所有更改并关闭文件。也在防火墙中打开所需的端口。
5)在所有节点上逐个启动Cassandra并确认所有节点都已启动。

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.


  • 问题:

连接到节点1并执行以下查询

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.

推荐答案

它似乎无法读取默认用户的身份验证数据。尝试 nodetool repair 所有节点上的system_auth键空间。此外,请确保复制设置(us-east)中使用的数据中心名称与您在 nodetool status 中看到的名称匹配。

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.

这篇关于Cassandra集群设置错误:UnavailableException:无法实现一致性级别QUORUM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆