I upgraded my Ubuntu 14.04 development system to 16.04 in August with the first point release. I have to say the upgrade process when really smooth. There where small issues with PHP and Python. The only painful issue I had was with Cassandra and CqlSh. The python version which is shipped with Ubuntu 16.04 is 2.7.12 and the version CqlSh is targeted is 2.7.11.

When I tried to connect to CqlSh I got the following error:

Connection error: ('Unable to connect to any servers', {'': TypeError('ref() does not take keyword arguments',)})

There are couple painful, and not so painful ways to downgrade python to the required version, but as I use DataStax’s DevCenter as a visual tool, so I did not bother. Applications built with Cassandra can still run as this is a bug in CqlSh.

Last week I did setup a headless Ubuntu 16.04 as development server for projects which going to use Cassandra among other tools. In this setup developers need to have access to CqlSh, so I had to find a solution for this problem. The least painful way is to install/upgrade the Cassandra python driver trough pip, with the following process:

# Keep everything updated
apt update && apt upgrade

# Install pip
apt install python-pip

pip install --upgrade pip

#Install the latest python driver
pip install cassandra-driver

# Export a user variable to override the bundled driver
export CQLSH_NO_BUNDLED=true

# To make the above permanent for all users
echo "CQLSH_NO_BUNDLED=true" >> /etc/environment

After this CqlSh should be up and running as normal

[email protected]:~# cqlsh
Connected to Test Cluster at
[cqlsh 5.0.1 | Cassandra 3.7.0 | CQL spec 3.4.2 | Native protocol v4]
Use HELP for help.

Share This