cassandra version Error - cassandra

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...

Related

Bad Request: line 1:0 no viable alternative at input 'clear'

I installed cassandra and run cqlsh:
Connected to Test Cluster at localhost:9160.
[cqlsh 4.1.1 | Cassandra 2.0.10 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
Use HELP for help.
and enter clear command on cqlsh. But i got this
cqlsh> clear;
Bad Request: line 1:0 no viable alternative at input 'clear'
cqlsh> clear
... ;
Bad Request: line 1:0 no viable alternative at input 'clear'
cqlsh>
the clear command was added in Cassandra 2.2.1 (commit) and you're using very old 2.0.10. If you just learning Cassandra, start with Cassandra 4.x, not use the version that was released 8 years ago...

How to change CQL version?

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

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.

Datastax DevCenter 1.5.0 connection to remote Cassandra 2.1.4 with SSL and CQL Version

Just installed 64 bit DevCenter 1.5.0 on my Windows 7x64 pc. Now I am trying to connect DevCenter to our Apache Cassandra installation on a remote server. Within DevCenter, I'm getting an error when I try to connect to a remote Cassandra installation. The message from the error log is
!ENTRY Connection # open 4 0 2016-05-19 08:03:02.529
!MESSAGE com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: host.domain.com/###.##.##.###:9042 (com.datastax.driver.core.TransportException: [host.domain.com/###.##.##.###:9042] Cannot connect))
I can however connect command line using cqlsh and it shows
cqlsh 5.0.1 | Cassandra 2.1.14 | CQL spec 3.2.1 | Native protocol v3.
In my cqlshrc file - I have to specify [cql] version = 3.2.1 and the certificate to make the connection function.
From what I have read - to make DevCenter connect - I had to do a couple of things
1) Create a truststore for the certificate and reference it in the connection properties with the password - and that seems to be ok I believe (info from the DataStax site)
2) The second thing I needed to do was change the cassandra.yaml file in C:\Program Files\DataStax-DDC\apache-cassandra\conf - change the rpc_address to the host.domain.com and verify start_native_transport: true (StackOverflow)
I am not sure what I am missing - to successfully connect DataStax DevCenter on my windows 7 machine to the apache cassandra installation on a remote server (host.domain.com).

Apache Cassandra - cqlsh operation timeout

I am trying to start cqlsh and this is what I get:
/bin$ ./cqlsh
Connection error: ('Unable to connect to any servers', {'127.0.0.1':
OperationTimedOut('errors=None, last_host=None',)})
I tried removing ~/.cassandra, did not work. I also compared cassandra.yaml with a version that worked.
Any ideas?
posting on this old thread as a memo for others, as i couln't managed to find any info to resolve these symptoms without debugging up to now:
got the same issue with a slow testing cluster, and i resolved it by setting a missing control_connection_timeout kwargs in Cluster() init, in cqlsh.py file.
issue opened and patch proposal provided at https://issues.apache.org/jira/browse/CASSANDRA-10959
Depending on your version and configuration, check the values specified for listen_address and/or rpc_address in your cassandra.yaml. If they are defined to anything other than localhost, you will need to provide that address when connecting with cqlsh.
$ grep listen_address: /etc/cassandra/cassandra.yaml
listen_address: 210.156.89.15
$ cqlsh 210.156.89.15 -u aploetz -p aploetz
Connected to PermanentWaves at 210.156.89.15.
[cqlsh 5.0.1 | Cassandra 2.1.4 | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.
aploetz#cqlsh>

Resources