cqlsh connection error: 'ref() does not take keyword arguments'

落花浮王杯 提交于 2019-11-26 16:38:45

You are running into CASSANDRA-11850, where cqlsh breaks with Python 2.7.11+. This ticket has been marked as "Resolved" and a patch has been applied to Cassandra 3.9 which has not been released yet.

I believe I installed all the necessary packages such as java 8 and python 2.7.12.

In the interim (until 3.9 is released) you can roll back to Python 2.7.10, and cqlsh should work (not trivial). Otherwise, DataStax DevCenter should work with Cassandra 3.7.

Edit 20161020

Cassandra 3.9 was released a few weeks ago, and can now be downloaded.

refer https://issues.apache.org/jira/browse/CASSANDRA-11850

After setting environment variable

CQLSH_NO_BUNDLED=TRUE

it resolved.

I use windows 7, python 2.7.12, cassandra 3.7

Need to add following command

sudo apt install python-pip
pip install cassandra-driver
export CQLSH_NO_BUNDLED=true

This works for Ubuntu 16.04 in Amazon EC2:

sudo apt-get --no-install-recommends install python-cassandra python3-cassandra
CQLSH_NO_BUNDLED=TRUE cqlsh "$(ec2metadata --local-ipv4)"

Even if after rolling back to python 2.7.10, the issue persists. It means the python 2.7.10 is not set as the default python version.

Go to /usr/bin directory and check the different python versions available, say python2.7 corresponds to version 2.7.10 ( you can check it by running command python2.7 in your terminal and the python version will be mentioned in the first line of the Interpreter,try the same with all other python versions available in the folder to find the one which corresponds to version 2.7.10).

Now, use the following commands to make correct python version (python2.7 in my case) as default choice

update-alternatives --install /usr/bin/python python /usr/bin/python2.7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!