Sometimes when I try cqlsh command on my Ubuntu 22.04 machine I get the following error:
Connection error: (Unable to connect to any servers, {127.0.0.1:9042:
ConnectionRefusedError(111, Tried connecting to [(127.0.0.1, 9042)].
Last error: Connection refused)})
And stopping or restarting Cassandra service won't help at all. This happens with no obvious reason, I mean I may exit the cqlsh and put my laptop on stand-by and comeback after hours and it works, but sometime it won't work!
After trying different solutions on the internet I found that if I run cassandra command it seems it executes some codes and keeps waiting at the end, but cqlsh command works after this in a new terminal, even if I cancel or close the previous terminal that I have been running cassandra command on.
I like to know why this happens after a while and how can I prevent it to happen again? Also what does cassandra command do? Why systemctl status cassandra shows it is active with no errors but cqlsh doesn't work until I run cassandra command?
@bestofman thanks for reaching out. It seems your inquiry is not related to CDC - for C OSS support, please check the C community home page - it has useful resources for how/where to get support from the community.
Sometimes when I try
cqlsh
command on my Ubuntu 22.04 machine I get the following error:And stopping or restarting Cassandra service won't help at all. This happens with no obvious reason, I mean I may exit the
cqlsh
and put my laptop on stand-by and comeback after hours and it works, but sometime it won't work!After trying different solutions on the internet I found that if I run
cassandra
command it seems it executes some codes and keeps waiting at the end, butcqlsh
command works after this in a new terminal, even if I cancel or close the previous terminal that I have been runningcassandra
command on.I like to know why this happens after a while and how can I prevent it to happen again? Also what does
cassandra
command do? Whysystemctl status cassandra
shows it is active with no errors butcqlsh
doesn't work until I runcassandra
command?