Cassandra cqlsh "unable to connect to any servers"

cdn picture cdn · Oct 7, 2015 · Viewed 25k times · Source

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.

Answer

Eric Walsh picture Eric Walsh · Apr 3, 2016

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)