cqlsh Connection error: ('Unable to connect to any servers'

12,992 views
Skip to first unread message

Florent Philippe

unread,
Mar 3, 2017, 4:48:20 AM3/3/17
to Kaa project
Hello everyone,

I installed Sandbox the latest version (0.10), and I wanna use Zeppelin with Cassandra Apache. But i have a problem with cqlsh, as you can see i have this error :

cqlsh
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

Before I had this problem but without sandbox, and I resolved it with this command : 

export CQLSH_NO_BUNDLED=TRUE

I tried it and still have the problem. I also tried to change timeout / RPC_port etc..

I follow the "zeppelin_demo_java" on WEB UI and when I to check if my port 9042 is listening with : 

sudo netstat -ntlp | grep 9042

I have nothing. I tried to add this port but still not functional.
Can you help me please ? Thank you so much !

Volodymyr Chyzhevskyi

unread,
Mar 6, 2017, 5:57:02 AM3/6/17
to Kaa project
Hi Florent Philippe 

Please run command:

sudo service cassandra start

and check again port 9042

Florent Philippe

unread,
Mar 6, 2017, 9:22:42 AM3/6/17
to Kaa project
Hi, thanks for your help.
But still have nothing when i execute sudo netstat -nltp | grep 9042

Volodymyr Chyzhevskyi

unread,
Mar 6, 2017, 3:43:09 PM3/6/17
to Kaa project
Please check status of cassandra service

sudo service cassandra status

If it is not running, the following output will be displayed:
"could not access pidfile for Cassandra"

see for more detail how ti fix it

Also check logs of cassandra for more details about possible exseptions

The default location of log and data directories is /var/log/cassandra/ and /var/lib/cassandra.

Check in /etc/cassandra/cassandra.yaml file properties:

listen_address: localhost

rpc_address: localhost


You can reinstall cassandra 
http://cassandra.apache.org/download/
Reply all
Reply to author
Forward
0 new messages