我目前正在运行一个节点.我正在尝试为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"',)})
Run Code Online (Sandbox Code Playgroud)
我试过跑,nodetool repair但它说:Replication factor is 1. No repair is needed for keyspace 'system_auth'
我该如何解决这个问题?
J D*_*Del 11
我设法解决了这个问题.
我必须ALTER KEYSPACE system_auth WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };像{'class': 'NetworkTopologyStrategy', 'DC1': '1', 'DC2': '1'}以前设置的那样运行,即使它是单节点集群.
这就是它无法达到QUORUM的原因.
小智 8
请按照以下步骤操作:
由于之前将system_auth设置为 {'class': 'NetworkTopologyStrategy', 'DC1': '1', 'DC2': '1'},因此出现了此问题,即使它是单节点集群。
默认情况下,用户“ cassandra”始终在system_auth中使用QUORUM。尝试创建其他用户(以超级用户身份),您的问题应该消失了。
原因是您不能在单个节点cluser上拥有QUORUM,请参见Igors Anwser。
| 归档时间: |
|
| 查看次数: |
9570 次 |
| 最近记录: |