SteveB SteveB - 9 days ago 5x
Apache Configuration Question

Apache Cassandra 3.7 CQLSH 'Unable to connect to any servers'

Apache cassandra version 3.7 is running on Ubuntu server 16.04 fine, all parts of apache cassandra started up no problem, the issue is, i go to connect using cqlsh:
$ CQLSH (My IP Address) 9160
then it says:
Connection error: ('Unable to connect to any servers',
{'': TypeError('ref() does not take keyword arguments',)}
i seen there was a bug for it:
but its for version cqlsh --version: cqlsh 5.0.1
cassandra -v: 3.5 (also occurs with 3.0.6)

Someone commented on my Apache Cassandra ticket:
Use the workaround described in the ticket:
If you have an up-to-date cassandra-driver installed, you can disable the embedded driver by setting the environment variable CQLSH_NO_BUNDLED to any non empty string, for example export CQLSH_NO_BUNDLED=true.


How do i disable the up-to-date cassandra-driver? what directory is it in? what file name? also if i disable it, will i be able to connect using CQLSH? what tool did you guys use to connect to apache cassandra to run commands etc. Besides CQLSH directly on the server?


As described in the ticket - define environment variable CQLSH_NO_BUNDLED and export it.

export CQLSH_NO_BUNDLED=true

It will tell cqlsh (which is Python program) to use external Cassandra Python driver, not the one bundled with the distribution. The bundled Cassandra driver is located in /opt/datastax-ddc-3.7.0/bin, the file name is

Then run cqlsh, which is located in /opt/datastax-ddc-3.7.0/bin.


It is possible that you will need to install Cassandra Python (if it was not installed already) using:

pip install cassandra-driver 

Note - folder names are for Datastax Cassandra build.