Search code examples
cassandralocalhostdatastaxcqlmultipeer-connectivity

I can't establish connection in datastax message: Cannot open connection


I have this problem with the connection because I have tried every way and it doesn't connect meenter image description here [otra opción (https://i.sstatic.net/Scw8J.jpg) I have tried to do several processes and I don't know why it doesn't connect. help me please!


Solution

  • It looks like you're trying to connect to Cassandra on your local machine, on the default port of 9042.

    If this is not working, I would check the following:

    • Cassandra is indeed running on your local machine (verify with nodetool status).
    • Either listen_address or rpc_address are bound to localhost. The address shown in the output of nodetool status is the address that should be used to connect.
    • You are providing the correct username and password, if CassandraAuthorizer and PasswordAuthenticator are being used.
    • You are providing the correct SSL/TLS certificate if client-to-node SSL is enabled.
    • Also, as of Cassandra 4.0, connecting with client-to-node SSL enabled now happens on port 9142, while regular, unencrypted traffic is still on 9042.