本文介绍了Cassandra cqlsh - 连接被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用 Cassandra (datastax) 2.1.3 版和 cqlsh 5.0.1 版.

I've just started working with Cassandra (datastax), version 2.1.3 and cqlsh version 5.0.1.

Cassandra 启动良好,集群立即运行.

Cassandra starts up fine and the cluster is operational instantly.

Cqlsh 不工作(在任何节点上)并发出以下错误:

Cqlsh is not working (on any of the nodes) and emits the following error:

连接错误:('无法连接到任何服务器',{'127.0.0.1':错误(111,尝试连接到 [('127.0.0.1', 9042)].最后一个错误:连接被拒绝")})

我尝试使用主机自己的 ip、其他主机的 ip、不同的端口启动 cqlsh,但结果仍然相同 - 始终拒绝连接.

I have tried starting cqlsh up with the hosts own ip, other hosts ip, different ports yet the result remains the same - always connection refused.

推荐答案

您需要在您尝试连接的节点上编辑 cassandra.yaml 并为 设置节点 IP 地址rpc_addresslisten_address 并重新启动 Cassandra.

You need to edit cassandra.yaml on the node you are trying to connect to and set the node ip address for rpc_address and listen_address and restart Cassandra.

rpc_address 是 Cassandra 监听客户端调用的地址.

rpc_address is the address on which Cassandra listens to the client calls.

listen_address 是 Cassandra 侦听其他 Cassandra 节点的地址.

listen_address is the address on which Cassandra listens to the other Cassandra nodes.

这篇关于Cassandra cqlsh - 连接被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 02:27