CQLSH is not recognized in google cloud datastax cluster nodes

元气小坏坏 提交于 2020-01-05 04:21:37

问题


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")})

回答1:


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 your broadcast_rpc_address. You can check them all by grepping your cassandra.yaml.

$ grep "_address:" cassandra.yaml 

listen_address: 192.168.1.3 
broadcast_address: 10.20.15.1
# listen_on_broadcast_address: false
rpc_address: 192.168.1.3 
broadcast_rpc_address: 10.20.15.1

In this case, your cqlsh command would look something like this:

cqlsh 10.20.15.1 -u youruser -p yourpassword


来源:https://stackoverflow.com/questions/50335666/cqlsh-is-not-recognized-in-google-cloud-datastax-cluster-nodes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!