Search code examples
cassandragoogle-cloud-platformdatastaxcqlsh

Not able to login to cqlsh in datastax Cassandra cluster hosted in Google cloud platform


I have set up a 2 node Casandra cluster in GCP.

enter image description here

But the issue is I am not able go to cqlsh.I am getting the belwo errorenter image description here


Solution

  • $ cqlsh
    Connection error: ('Unable to connect to any servers', {'127.0.0.1':
    

    First, as I mentioned to you in this answer, using cqlsh to connect to 127.0.0.1 simply will not work in a multi-node cluster. You will need to specify the IP address shown in the result of your nodetool status command.

    Next, the second part of the error message should give a big clue on this one:

        AuthenticationFailed('Remote end requires authentication'),)})
    

    With authentication enabled, you will need to provide a valid username and password to log in. If you have not created any new users, then the username and password will both be defaulted to "cassandra."

    $ cqlsh 10.138.0.3 -u cassandra -p cassandra