Cassandra cqlsh Connection error : 'Unable to connect to any servers',.cql_version '3.4.0' is not supported by remote

Cassandra cqlsh Connection error : 'Unable to connect to any servers',.cql_version '3.4.0' is not supported by remote

我试图通过 cqlsh 连接到我的远程 cassandra 数据库,

Connection error: ('Unable to connect to any servers', {'XX.XX.XX.XX': ProtocolError("cql_version '3.4.0' is not supported by remote (w/ native protocol). Supported versions: [u'3.2.1']",)})

我从这个 link 安装了 Planet Cassandra 版本 3.2.1。

我 运行 命令:nodetool version 它显示 3.2.1 版本。

我发现了类似的问题 ,但这对我没有帮助。

嗯,看来您使用的是 cqlsh 的 "old" 版本,而不是 Cassandra 3.2.1 附带的版本。

尝试

shell> which cqlsh 

shell> locate cqlsh

看看它是否指向您正确的版本

不过,如果您想通过旧版本进行连接,您可以:

$ cqlsh --cqlversion=3.2.1 host_ip

例如:$ cqlsh --cqlversion=3.2.1 192.168.0.172 其中 192.168.0.172 是您要连接的机器。