Cassandra cqlsh - connection refused

前端 未结 20 1832
名媛妹妹
名媛妹妹 2020-12-01 11:50

I\'ve just started working with Cassandra (datastax), version 2.1.3 and cqlsh version 5.0.1.

Cassandra starts up fine and the cluster is operational instantly.

相关标签:
20条回答
  • 2020-12-01 12:25

    Had same problem recently after downgrade from Cassandra 3.0 to Cassandra 2.2 on ArchLinux.

    Unlike above solutions my problem wasn't in .cassandra, but version 3.0 left its configuration in /var/lib/cassandra directory.

    Following commands solved my problem:

    sudo rm -R /var/lib/cassandra
    sudo rm -R /var/log/cassandra
    sudo rm -R /usr/share/cassandra
    

    Then i installed cassandra and everything worked again :)

    0 讨论(0)
  • 2020-12-01 12:28

    Try to change the rpc_address to point to the node's IP instead of 0.0.0.0 and specify the IP while connecting to the cqlsh, as if the IP is 10.0.2.64 and the rpc_port left to the default value 9160 then the following should work:

    cqlsh 10.0.2.64 9160 
    

    OR

    cqlsh 10.0.2.64
    

    Also make sure that start_rpc is set to true in /etc/cassandra/cassandra.yaml configuration file.

    0 讨论(0)
  • 2020-12-01 12:28

    Check for correct IP address in the cassandra.yaml file. Majority of times the error is due to incorrect IP address of your system also the username and password too.

    After doing so initiate cqlsh by the command :-

    cqlsh 10.31.79.1 -u cassandra -p cassandra

    0 讨论(0)
  • 2020-12-01 12:29

    Got into this issue for [cqlsh 5.0.1 | Cassandra 3.11.4 | CQL spec 3.4.4 | Native protocol v4] had to set start_native_transport: true in cassandra.yaml file.

    For verification,

    • try opening tailf /var/log/cassandra/system.log file in one-tab
    • update cassandra.yaml
    • restart cassandra sudo service cassandra restart

    In logfile is shows.

    INFO  [main] 2019-03-15 19:53:06,156 Server.java:156 - Starting listening for CQL clients on /10.139.45.34:9042 (unencrypted)...
    
    0 讨论(0)
  • 2020-12-01 12:29

    cqlsh --cqlversion="3.4.0" Connected to Test Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 3.0.9 | CQL spec 3.4.0 | Native protocol v4]

    try the above command. It works for me.

    0 讨论(0)
  • 2020-12-01 12:30

    Try to telnet to the given address. In my case, there was a firewall in place blocking me.

    0 讨论(0)
提交回复
热议问题