首页 > 解决方案 > 无法建立连接,所有主机尝试查询失败

问题描述

我知道这可能是基本问题,但由于我是 cassandra 新手,并且在任何地方都没有找到解决方案,所以当我尝试在 DataStax 开发中心连接到 cassandra 服务器时,它给了我以下异常。

在此处输入图像描述

下面是系统配置:

操作系统:Windows 10 专业版(64 位)

apache-cassandra-3.11.2

下面是 cassandra.yaml 配置:

start_native_transport: true

broadcast_rpc_address: 1.2.3.4

native_transport_port_ssl: 9142

listen_address: 192.168.2.22

rpc_address: 192.x.x.x

我在 cassandra.yaml 文件中完成了这些更改:start_rpc: true rpc_port: 9042

在 cmd 上运行此命令时:nodetool -h localhost -p 9042 status

收到此错误:Failed to connect to 'localhost:9042' - ConnectIOException: 'non-JRMP server at remote endpoint'.

任何帮助,将不胜感激。

标签: cassandranosqldatastaxcassandra-3.0

解决方案


似乎您已将 native-transport-port 配置为:9142,但您正在尝试使用开发中心连接到 9042 端口。请更正并验证。


推荐阅读