问题描述
我在 OSX 上安装了 Cassandra.尝试从/bin/运行 cqlsh 时,出现以下错误:
I installed Cassandra on OSX.When trying to run cqlsh from /bin/, I get the following error:
> Connection error: ('Unable to connect to any servers', {'127.0.0.1':
> ConnectionShutdown('Connection <AsyncoreConnection(4522252560)
> 127.0.0.1:9160 (closed)> is already closed',)})
我在安装 Cassandra 时遇到了困难,我使用了 brew install cassandra,从 datastax 安装了 DSE,并从 Apache 下载了一个二进制文件.
I had difficulty installing Cassandra, and had used brew install cassandra, installed DSE from datastax, and downloaded a binary from Apache.
推荐答案
我认为问题是由于之前的安装没有正确卸载.我的用户 .cassandra
目录有一些默认配置,这肯定是针对不同版本的,并且阻止了 cqlsh 启动.
I think the issue was the result of having a previous installation that wasn't properly uninstalled. My user .cassandra
directory had some default configs, that must have been for a different version, and prevented cqlsh from starting.
rm -Rf ~/.cassandra
之后,我可以正常运行 cqlsh.
After that, I could run cqlsh properly.
$ bin/cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.
cqlsh>
这篇关于Cassandra cqlsh 无法连接到任何服务器 - 127.0.0.1:9160(关闭)>已经关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!