Cassandra Authenticator发生错误(无法达到一致性级别QUORUM)

时间:2018-12-06 15:38:10

标签: cassandra nosql

我遇到cassandra Authenticator错误。 我更改了cassandra.yaml文件中的“ authenticator”值后,cqlsh返回此错误:

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’“)})

这是我逐步执行的命令:

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’“)})

我遵循Configuration authentication这一部分

这是我的配置:

[cqlsh 5.0.1 | Cassandra3.0.9 | CQL规范3.4.0 |本机协议v4] Ubuntu 16.04.1

有什么想法吗?

非常感谢:)

1 个答案:

答案 0 :(得分:3)

如果DC中有1个节点的群集,并且复制因子为3,则无法达到仲裁一致性(3的一半以上是2,但是只有1个节点)。系统身份验证需要法定人数,因此请将RF更改为1。也可能您的节点实际上不在“ dc1”中,因此没有副本。包括您的nodetool status,它将有助于确定每个DC中有多少个节点。

相关问题