Cassandra cqlsh“无法连接到任何服务器" [英] Cassandra cqlsh "unable to connect to any servers"

查看:38
本文介绍了Cassandra cqlsh“无法连接到任何服务器"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在命令行执行 cqlsh.bat 时收到以下消息

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']",)})

我正在运行 Python 2.7.10 版和 Cassandra 2.2.1 版.不确定它是否相关,但是当我启动 Cassandra 服务器时,我需要在 PowerShell 上运行Set-ExecutionPolicy Unrestricted",否则它不起作用.

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.

推荐答案

您可以使用标志强制 cqlsh 使用特定的 cql 版本

You can force cqlsh to use a specific cql version using the flag

--cqlversion="#.#.#"

--cqlversion="#.#.#"

示例 cqlsh 用法(和键/值):

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆