如果 cassandra 版本是 2.2.12 当时 cqlsh 正在工作,更新最新版本的 cassandra (3.11.2v) 后 cqlsh 不工作

If cassandra version is 2.2.12 at that time cqlsh is working, after updating latest version of cassandra (3.11.2v) cqlsh not working

我是 cassandra 的新手 database.if 我的 cassandra 版本是 2.2.12 在那个地方 cqlsh 工作没有任何问题并且它已连接。

更新我的 cassandra db 3.11.2 版本后,cqlsh 未连接并抛出错误

Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

再次降级我的 cassandra 版本后,cqlsh 正在运行。 这就是为什么我最新的 cassandra cqlsh 不工作。

请帮帮我, 谢谢

运行 netstat 命令并得到如下输出: 下面的命令对我有用检查一次。

netstat -an | grep 9042 tcp 0 0 ::ffff:10.1.22.10:9042 :::* LISTEN The above output indicated that we are listening on port 9042 and IP address 10.1.22.10.

但是,错误清楚地表明 cqlsh 默认尝试连接到 127.0.0.1。所以我们收到 "connection refused" 错误。

修改cqlsh命令连接IP地址10.1.22.10,重新运行如下,成功连接Cassandra数据库