2016-04-08 55 views
0

我安装了cassandra但我没有看到cqlsh。我有蟒蛇,所以我安装了从Cassandra上没有cqlsh安装在CentOS 7.2上

pip install cqlsh 
Successfully installed cqlsh-5.0.3 

cqlsh当我尝试连接到卡桑德拉我得到这个错误

[[email protected] sbin]$ cqlsh 10.0.0.60 
Connection error: ('Unable to connect to any servers', {'10.0.0.60': ProtocolError("cql_version '3.3.1' is not supported by remote (w/ native protocol). Supported versions: [u'3.1.7']",)}) 

[[email protected] sbin]$ cqlsh 10.0.0.60 9160 
Connection error: ('Unable to connect to any servers', {'10.0.0.60': ConnectionShutdown('Connection <AsyncoreConnection(140356880106448) 10.0.0.60:9160 (closed)> is already closed',)}) 
[[email protected] sbin]$ 

在哪里可以找到自带的卡桑德拉从datastax的cqlsh?或者,如果上述工作有效,我需要做什么?

+0

该错误是因为你安装了cqlsh不匹配服务器。你是如何安装Cassandra的?我不知道任何不包含cqlsh的方法。也许它不在你的道路上。 –

+0

不,问题是我安装了anaconda,而CentOS python稍后在路径中出现。所以它正在拿起Anaconda python。由于该站点包与系统python,它不会工作。如果我尝试安装cqlsh的anaconda版本,则存在版本不兼容问题。令人沮丧。 – Ivan

+0

我通过将cqlsh目录复制到anaconda site-packages目录来解决它 – Ivan

回答

0

尝试连接这样的:

$ cqlsh 10.0.0.60 9042 -u -p --cqlversion = “3.1.7”