Cassandra cqlsh“无法连接到任何服务器” [英] Cassandra cqlsh "unable to connect to any servers"
本文介绍了Cassandra cqlsh“无法连接到任何服务器”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在命令行上执行cqlsh.bat时会收到以下消息
连接错误:(无法连接到任何服务器',{'127.0.0.1':ProtocolError(cql_version'3.3.0'不支持远程(w /本地协议)。支持的版本:[u'3.2.0'],)})
我运行的是Python 2.7.10版本以及Cassandra版本2.2.1。不确定是否相关,但当我启动Cassandra服务器,我需要在PowerShell上运行Set-ExecutionPolicy Unrestricted,否则它不工作。
解决方案
您可以使用标志强制cqlsh使用特定的cql版本
- cqlversion = 。#
示例cqlsh用法(和键/值):
< p $ p>
cqlsh 12.34.56.78 1234 -u username -p password --cqlversion =3.2.0
cqlsh(IP ADDR)(PORT)(DB_USERN)(DB_PASS) )
I get the following message when executing cqlsh.bat on the command line
Connection error: ('Unable to connect to any servers', {'127.0.0.1': ProtocolError("cql_version '3.3.0' is not supported by remote (w/ native protocol). Supported versions: [u'3.2.0']",)})
I'm running Python version 2.7.10 along with Cassandra version 2.2.1. Not sure if it's related but when I start the Cassandra server I need to run "Set-ExecutionPolicy Unrestricted" on PowerShell or else it doesn't work.
解决方案
You can force cqlsh to use a specific cql version using the flag
--cqlversion="#.#.#"
Example cqlsh usage (and key/values):
cqlsh 12.34.56.78 1234 -u username -p password --cqlversion="3.2.0"
cqlsh (IP ADDR) (PORT) (DB_USERN) (DB_PASS) (VER)
这篇关于Cassandra cqlsh“无法连接到任何服务器”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文