Reputation: 1
I am getting this error after running Cassandra
command and then trying to run cqlsh
in another command prompt window. Can you please let me know that how to solve this?
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(10061, "Tried connecting to [('127.0.0.1', 9042)]. Last error: No connection could be made because the target machine actively refused it")})
Upvotes: 0
Views: 632
Reputation: 16313
There are 2 possible causes for it:
(a) either Cassandra is not running, or
(b) the process is not bound to localhost
(127.0.0.1
).
Cassandra is listening for clients/apps on rpc_address
(or native_transport_address
for DSE).
You can check the IP address + port that Cassandra is listening on by running either of these 2 commands:
$ netstat -tnlp
$ sudo lsof -nPi -sTCP:LISTEN
Cheers!
Upvotes: 0