I have deployed a 4 node datastax cluster in GCP. I can ssh into each of the VM nodes but cqlsh is not recognized.Can you please help me to understand where I am going wrong
error:
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")})
If your cluster is working correctly, then the nodes must know about each other by their own IPs (internal or external). So Cassandra isn't configured to bind 9042 to 127.0.0.1, which means trying to cqlsh to 127.0.0.1:9042 won't work.
One way to check, would be just to do a
nodetool status
, and use one of those IP addresses. But, as you're on GCP, you may have both internal and external IP addresses, so in that case it really depends on which IP is set as yourbroadcast_rpc_address
. You can check them all by grepping your cassandra.yaml.In this case, your cqlsh command would look something like this: