我安装了cassandra
,但我没有看到cqlsh
。我有anaconda所以我安装了cqlsh
pip install cqlsh
Successfully installed cqlsh-5.0.3
当我尝试连接到cassandra时,我收到此错误
[idf@node1 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']",)})
[idf@node1 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',)})
[idf@node1 sbin]$
我在哪里可以找到来自datastax的cassandra附带的cqlsh?或者如果上述情况有效,我还需要做什么?
尝试像这样连接:
$ sglsh 10.0.0.60 9042 -y -p --slversion =“3.1.7”
如果anaconda2预先安装在系统中,cqlsh
无法正常工作,因为它无法导入cqlshlib
。首先,你必须在anaconda中安装cqlsh
,然后用系统级安装的cqlshlib
覆盖:
pip install cqlsh
find /usr/lib/ -name cqlshlib | xargs cp -R -t ~/anaconda2/lib/python2.7/site-packages/cqlshlib/