Cassandra - 无法达到一致性级别 QUORUM

标签 cassandra

我目前正在运行一个节点。我正在尝试为 Cassandra 启用密码身份验证。

我正在遵循本指南:http://cassandra.apache.org/doc/latest/operating/security.html#password-authentication

我会注意到我没有改变 system_auth的复制,因为它是一个单节点集群。

我编辑了 cassandra.yaml使用 authenticator: PasswordAuthenticator .

然后我重新启动了 cassandra 并尝试了命令 cqlsh -u cassandra -p cassandra ,但这给了我错误:

Connection error: ('Unable to connect to any servers',
{'127.0.0.1': AuthenticationFailed(u'Failed to authenticate to 127.0.0.1: 
code=0100 [Bad credentials] message="org.apache.cassandra.exceptions.
UnavailableException: Cannot achieve consistency level QUORUM"',)})

我试过运行 nodetool repair但它说:Replication factor is 1. No repair is needed for keyspace 'system_auth'
我该如何解决这个问题?

最佳答案

我设法解决了这个问题。

我不得不跑 ALTER KEYSPACE system_auth WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };因为它被设置为 {'class': 'NetworkTopologyStrategy', 'DC1': '1', 'DC2': '1'}以前,即使它是一个单节点集群。

这就是它无法达到 QUORUM 的原因。

关于Cassandra - 无法达到一致性级别 QUORUM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44883940/

相关文章:

javascript - 无法将数据从js传递到node.js中的jade

cassandra - 在 Cassandra 中禁用提交日志

amazon-web-services - gocql.createSession : Consistency level ANY is not supported for this operation

c++ - 服务器端警告 : Aggregation query used without partition key

scala - 从 Spark 中的 Cassandra 中减去第一行和最后一行的值

cassandra - 使用 PlayOrm 读取查询确实会返回适当的结果

python - cassandra cql 是否支持聚合函数,如 group by 和 order by

c# - Cassandra:如何持久化和恢复 Thrift 对象?

java - Cassandra 中未排序的 map 类型

c - 无法使用 Cassandra 的 C 驱动程序连接到 key 空间