无法登录 Google 云平台中托管的 datastax Cassandra 集群中的 cqlsh

Not able to login to cqlsh in datastax Cassandra cluster hosted in Google cloud platform

我已经在 GCP 中设置了一个 2 节点的 Cassandra 集群。

但问题是我无法前往 cqlsh.I 我收到以下错误

试试这个:

cqlsh 10.138.0.3 9042
$ cqlsh
Connection error: ('Unable to connect to any servers', {'127.0.0.1':

首先,正如我向您提到的 in this answer,使用 cqlsh 连接到 127.0.0.1 在多节点集群中根本不起作用。您需要指定 nodetool status 命令结果中显示的 IP 地址。

接下来,错误消息的第二部分应该给出了关于这一点的重要线索:

    AuthenticationFailed('Remote end requires authentication'),)})

启用身份验证后,您需要提供有效的用户名和密码才能登录。如果您没有创建任何新用户,则用户名和密码都将默认为"cassandra."

$ cqlsh 10.138.0.3 -u cassandra -p cassandra