How to change CQL version? - cassandra

When i try to connect to cqlsh I get this error:
Connection error: ('Unable to connect to any servers', {'127.0.0.1': ProtocolError("cql_version '3.3.1' is not supported by remote (w/ native protocol). Supported versions: [u'3.4.4']",)})
If I add explicitly version like this cqlsh --cqlversion=3.4.4 it is fine, but I wonder how to set CQL version to be 3.4.4 by default so I can connect without parameter ?

You can specify this in your .cassandra/cqlshrc file:
[cql]
version=3.4.4

Related

Multinode cassandra cluster: Connection error: ('Unable to connect to any servers')

For my 6 node cluster, I am unable to cqlsh <ip> to the cluster. It gives me :
Connection error: ('Unable to connect to any servers', {'192.168.19.2': ProtocolError("cql_version '3.3.1' is not supported by remote (w/ native protocol). Supported versions: [u'3.4.4']",)})
But, I checked nodetool status, all my nodes are up and running. Also, I am able to contact the cluster via client.
For the cassandra.yaml on each node, I set the following parameters:
listen_address: node's ip
broadcast_address: node's ip
rpc_address: node's ip
broadcast_address: left blank
seed node: same two ips in each nodes
What seems to be the issue?
Update:
I am able to cqlsh from other nodes but not from the first nodes. I can observe that while working on the first node, I somehow messed up with its cqlsh version. Is it possible to change it?
Connection error: ('Unable to connect to any servers',
{'192.168.19.2': ProtocolError("cql_version '3.3.1' is not supported
by remote (w/ native protocol). Supported versions: [u'3.4.4']",)})
You do have different versions of cassandra installed or using the wrong driver. You want to upgrade to your drivers for connecting to your cluster as 3.4 seems to be a 3.10.x cluster while your driver only supports 3.0.x.

cassandra installation on windows 10 , unable to connect to server

i have installed "datastax-ddc-64bit-3.9.0.msi" on windows 10, when i run Cassandra CQL Shell i have got this error.
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
What is the rpc_address configured? And connect CQL with that hostname/IP. E.g.
cqlsh <rpc_address> <native_transport_port>
Check the above values in your Cassandra.yaml file.

Can't connect to Cassandra when i'm trying to edit cassandra.yaml

Every time i'm trying to edit the cassandra.yaml file, I can't connect to Cassandra with cqlsh, even if I don't modify the file.
I'm getting the following error :
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})
The parameters for rpc_address and listen_address are good, even for the port.
I really need help for this, thank you in advance
Before going query on cassandra setup or export the environment variable of cqlsh.
You have to export HOST AND PORT in environment like:
export CQLSH_HOST="hostname/ip_address"
export CQLSH_PORT="cassandra_port"
Try connecting like this:
cqlsh IP_ADDRESS_HERE -u cassandra

cassandra version Error

Hi anyone instruct me which version of cassandra should I use to run cqlsh-3.4.3, So that i will be able to run GROUP BY queries.
Currently My environment is
[cqlsh 5.0.1 | Cassandra 3.9 | CQL spec 3.4.2 | Native protocol v4]
Error on trying bin/cqlsh --cqlversion=3.4.3
Connection error: ('Unable to connect to any servers', {'127.0.0.1': ProtocolError("cql_version '3.4.3' is not supported by remote (w/ native protocol). Supported versions: [u'3.4.2']",)})
Please Suggest.Thanks.
Same Error while tried with cassandra 3.7 Also.
You can try to force cqlsh to use a specific cql version using the option
--cqlversion="#.#.#"
example: cqlsh 127.0.0.1 9042 --cqlversion="3.2.0" (in your case: 3.4.2)
example of mine:
me#XXX:~$ cqlsh <cassandra_ip>
Connection error: ('Unable to connect to any servers', {<cassandra_ip>: ProtocolError("cql_version '3.4.2' is not supported by remote (w/ native protocol). Supported versions: [u'3.3.1']",)})
me#XXX:~$ cqlsh <cassandra_ip> --cqlversion="3.3.1"
Connected to UAT Analytics Cluster at <cassandra_ip>:9042.
[cqlsh 5.0.1 | Cassandra 2.2.8 | CQL spec 3.3.1 | Native protocol v4]
Use HELP for help.
cqlsh>
UPDATE
(1) group by will be supported in CQL 3.4.3 and Cassandra 3.10.
(2) It is not recommended to upgrade CQL spec for Cassandra of specific version. OR it is impossible to upgrade CQL spec version for one Cassandra version (here).
(3) In order to use group by, you should upgrade cassandra to 3.10, OR user defined functions, OR change your table design...

How fix error in install and connect apache cassandra on win?

When I use the command bin/cassandra install in git bash it displays this error:
$ Error: Could not find or load main class org.apache.cassandra.service.CassandraDaemon
It completes on "cmd," but when I use bin/cqlsh I get this error:
Connection error: ('Unable to connect to any servers',
{'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)].
Last error: No connection could be made because the target machine actively refused it")})
How can i fix it?
for install cassandra on windows , only way for this work , should we install it with datastax? or can we install cassandra only?

Resources