datastax—如何将两节点cassandra集群降级为独立集群

fv2wmkja  于 2021-06-14  发布在  Cassandra
关注(0)|答案(1)|浏览(453)

我已经设置了带有两个节点的cassandra集群,node1和node2。node1是种子节点。
我想让node2从集群中退役。
系统身份验证配置

KEYSPACE system_auth WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '2'}  AND durable_writes = true;

我已更改密钥空间的配置 my_data 从下面

KEYSPACE my_data WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '2'}  AND durable_writes = true;

KEYSPACE my_data WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '1'}  AND durable_writes = true;

更改配置后,我已对 system_auth 以及 my_data .
停用node2后使用 nodetool -h node2 -pw somepassword -u someuser decommission ,我在通过cqlsh连接node1时遇到以下错误。

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

我正在使用相同的凭据,但无法登录。你能建议更改正确的配置和过程吗?

e7arh2l6

e7arh2l61#

在停用node2之后,我删除了对cassandra服务器的身份验证,重新启动了服务器。
这允许我连接到cassandra,之后我将system\u auth keyspace拓扑更改为simplestragy,replication\u factor为1。然后我修复了系统\u auth keyspace
然后重新启动cassandra服务器,并再次修复系统\u auth密钥空间。
现在我可以用用户名和密码连接了。
删除身份验证过程

authenticator: AllowAllAuthenticator
authorizer: AllowAllAuthorizer

commands:-

nodetool -h nodetool -pw somepassword -u someuser decommission
nodetool repair system_auth

相关问题