如何将cassandra集群降级为独立集群

how to degrade cassandra cluster to standalone

我设置了具有两个节点 node1 和 node2 的 cassandra 集群。 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_authmy_data 进行了全面修复。

使用 nodetool -h node2 -pw somepassword -u someuser decommission 停用 node2 后,通过 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"',)})

我正在使用相同的凭据但无法登录。您能否建议要更改的正确配置以及执行此操作的过程?

  1. 停用 node2 后,我已删除身份验证 Cassandra 服务器重新启动了服务器。
  2. 这让我可以连接到 Cassandra,之后我将 system_auth 键空间拓扑更改为 SimpleStrategy,replication_factor 为 1。然后我修复了 system_auth 键空间
  3. 然后重新启动 Cassandra 服务器并再次修复 system_auth 键空间。
  4. 现在我可以用用户名和密码连接了。

删除身份验证过程

authenticator: AllowAllAuthenticator
authorizer: AllowAllAuthorizer

命令:-

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