【问题标题】:Error with Cassandra Authenticator (Cannot achieve consistency level QUORUM)Cassandra Authenticator 出错(无法达到一致性级别 QUORUM)
【发布时间】:2019-05-08 08:25:54
【问题描述】:

我在使用 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 |卡桑德拉3.0.9 | CQL 规范 3.4.0 |本机协议 v4] Ubuntu 16.04.1

有什么想法吗?

非常感谢:)

【问题讨论】:

    标签: cassandra nosql


    【解决方案1】:

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

    【讨论】:

    • 完美,我的节点在 datacenter1。问题已解决,谢谢!
    猜你喜欢
    • 2016-07-05
    • 2015-10-27
    • 1970-01-01
    • 2018-08-14
    • 1970-01-01
    • 2020-04-20
    • 1970-01-01
    • 1970-01-01
    • 2014-09-22
    相关资源
    最近更新 更多