Cassandra Cqlsh不能正常工作

问题描述 投票:0回答:3

我刚刚开始使用Cassandra(自制软件安装),版本3.7和cqlsh版本5.0.1。 ,OS X El Capitan

Cassandra启动良好,集群即时运行。

Cqlsh无法正常工作(在任何节点上)并发出以下错误:

Connection error: ('Unable to connect to any servers', {'127.0.0.1':
error(61, "Tried connecting to [('127.0.0.1', 9042)]. Last error:
Connection refused")})
cassandra cqlsh
3个回答
0
投票

编辑cqlsh并更改DEFAULT_HOST = IP,然后运行cqlsh。


0
投票

我认为你应该做的第一步是运行netstat -ntpl。这应该列出系统上活动的所有端口。检查本地地址,你会发现一个9024前面的IP。

使用此IP连接即cqlsh IP。如果在netstat输出中找不到9042端口,请检查cassandra.yaml文件。 Grep for native_transport_port查看它是9042还是其他不同的东西。

如果不同于通过cqlsh连接该端口。


0
投票

供将来参考,如果其他人得到它。

我正在运行[cqlsh 5.0.1 | Cassandra 3.11.4 | CQL spec 3.4.4]

start_native_transport: true文件中添加cassandra.yaml字段,默认情况下它不启用它,因此不与客户端进行rpc通信。

现在尝试连接cqlsh rpc_endpoint(rpc addr set in cassandra.yaml)

© www.soinside.com 2019 - 2024. All rights reserved.