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

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.

Related

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

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.

Cassandra connectivity issue

I am new to cassandra.
These are the resources with theirs' respected versions that i have used to set up cassandra.
java : jdk1.8.0.111
cassandra : 3.10
ubuntu : 15.10
I have intsalled cassandra and made changes in the cassandra.yaml file. when i run cqlsh from editor then it shows following error:
Connection error: ('Unable to connect to any servers', {'127.0.0.1': AuthenticationFailed('Remote end requires authentication.',)})
I tried my best to look at the issue but couldn't resolve it.
can someone please help me in this.
It seems you have enabled Authentication in your cassandra.yaml file. Login in cqlsh with default username and password 'cassandra'.
cqlsh <listen address> <cql port> -u cassandra -p cassandra
try below code
from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
auth_provider = PlainTextAuthProvider(username ='<<username>>', password='<<password>>')
cluster=Cluster(['<<some ip or url >>'], auth_provider=auth_provider)

Cassandra opscenter is not communicating with cluster

I have 2 node Cassandra cluster with datastax-agent up and running(one seed node) also nodetool status showing healthy.
In the 3 node I have opscenter install and the UI is loading fine with a blank screen, when I saw the var log it's complaining 'NO cassandra connection available for hostlist with a invalid unsupported version'(paster the log details message below). Any help is highly appreciated
2017-02-25 06:33:06+0000 [CLUSTER_NAME] ERROR: Control connection failed to connect, shutting down Cluster: ('Unable to connect to any servers', {'SEED-IP': })
2017-02-25 06:33:06+0000 [CLUSTER_NAME] WARN: No cassandra connection available for hostlist ['SEED-IP'] . Retrying.
I was using an old version of opscenter which was not matching the version of dse. Here is the map for your refference.
Reference: datastax doc

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