Cassandra cqlsh - connection refused

前端 未结 20 1833
名媛妹妹
名媛妹妹 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:32

    The first and foremost step to diagnose is to check the Cassandra logs.

    Find out the process and there will be hints in the command line parameters to tell you where the logs files are.

    ps aux | grep cassandra

    In my case, it was in default location /etc/cassandra/conf/cassandra.yaml (if you installed the yum package).

    Make sure three things are configured and configured the same host/ip.

    1. listen_address - you may leave it blank it will default to hostname/first IP binding with eth0 network card
    2. rpc_address - this is optional, leave blank if you want it to be same as listen_address
    3. seeds - this is a double quoted string of comma-separated list of IP addresses or hostnames. This was default to a hardcoded "127.0.0.1", changing it to the same as list_address and restart of Cassandra service made it work for me.

    References:

    • https://stackoverflow.com/a/42507530/416394
    • https://docs.datastax.com/en/dse/5.1/dse-admin/datastax_enterprise/config/configCassandra_yaml.html#configCassandra_yaml__seed_provider
    0 讨论(0)
  • 2020-12-01 12:32

    I was trying to run it on a network drive. So I increased the client_timeout in cqlsh and it worked.

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