Google Cloud Datastax丛集节点无法识别CQLSH [英] CQLSH is not recognized in google cloud datastax cluster nodes
问题描述
我在GCP中部署了一个4节点的datastax集群。我可以使用ssh进入每个VM节点,但是无法识别cqlsh。请帮助我了解我要去哪里哪里
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
错误:
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")})
推荐答案
如果群集正常运行,则节点必须通过自己的IP(内部或外部)相互了解。因此未将Cassandra配置为将9042绑定到127.0.0.1,这意味着尝试将cqlsh绑定到127.0.0.1:9042是行不通的。
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.
一种检查方式,只是做一个 nodetool状态
,并使用其中一个IP地址。但是,当您使用GCP时,可能同时具有内部和外部IP地址,因此在这种情况下,它实际上取决于将哪个IP设置为您的 broadcast_rpc_address
。您可以通过grepping cassandra.yaml来检查所有内容。
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
在这种情况下,您的cqlsh命令如下所示:
In this case, your cqlsh command would look something like this:
cqlsh 10.20.15.1 -u youruser -p yourpassword
这篇关于Google Cloud Datastax丛集节点无法识别CQLSH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!