简体   繁体   English

AWS中Cassandra的节点连接问题

[英]Nodes connection problem for Cassandra in AWS

Hi I'm creating a cluster in AWS to run Cassandra. 嗨,我正在AWS中创建一个集群来运行Cassandra。 So far I have created 3 Ec2 instances in the same region but in three different availability zones. 到目前为止,我已经在同一区域但在三个不同的可用区域中创建了3个Ec2实例。

I modified the .yaml in this way: 我以这种方式修改了.yaml:

  • For Ec2-1 : seeds: Ec2-2 private_ip, listen_address: Ec2-2 private_ip, broadcast_rpc_address: Ec2-2 private_ip (with rpc_address: 0.0.0.0) 对于EC2-1 :种子: EC2-2私有IP侦听地址EC2-2私有IP ,广播RPC地址EC2-2私有IP (RPC地址:0.0.0.0)
  • For Ec2-2 and Ec2-3 similarly I used the private_ip of Ec2-3 and Ec2-1 respectively. 对于Ec2-2Ec2-3,我分别使用Ec2-3Ec2-1的private_ip。

Finally I put all these three instances in the same security group but actually cassandra does not work. 最后,我将所有这三个实例都放在同一安全组中,但实际上cassandra不起作用。

The error in the log file for Ec2-1 is: Ec2-1的日志文件中的错误是:

org.apache.cassandra.exceptions.ConfigurationException: Unable to bind to address /172.31.15.109:7000. org.apache.cassandra.exceptions.ConfigurationException:无法绑定到地址/172.31.15.109:7000。

(where 172.31.15.109 is the Ec2-2 private_ip). (其中172.31.15.109是Ec2-2 private_ip)。

This seems to be a problem related with the communication between the nodes but i don't understand why they can't communicate (with a single ping or a telnet using port 22 they sees each other). 这似乎是与节点之间的通信有关的问题,但是我不明白为什么它们无法通信(使用单个ping或使用端口22的telnet,它们可以互相通信)。

Those are the rule I added in the security group both in inbound and outbound: i also added the rule all traffic but nothing change. 这些是我在入站和出站安全组中添加的规则:我还添加了所有流量但没有任何变化的规则。

安全组规则

Your configuration seems to be wrong. 您的配置似乎有误。

Refer the link http://cassandra.apache.org/doc/latest/configuration/cassandra_config_file.html 请参阅链接http://cassandra.apache.org/doc/latest/configuration/cassandra_config_file.html

The listen_address and rpc_address of a node should IP of the node itself not other node's IP. 节点的listen_address和rpc_address应该是节点本身的IP,而不是其他节点的IP。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM