简体   繁体   English

Cassandra 新节点无法加入集群

[英]Cassandra new node unable to join the cluster

Actually I'm adding new Elassandra node but the issue obviously involved to the Cassandra configurations.实际上我正在添加新的 Elassandra 节点,但问题显然涉及 Cassandra 配置。

Previously, I have two nodes in the cluster.以前,我在集群中有两个节点。 There're perfectly connect with each other.彼此之间有着完美的联系。 Using nodetool status also returns both nodes information.使用 nodetool status 还会返回两个节点信息。

Then I added the new node to the cluster by followed this article https://docs.datastax.com/en/archived/cassandra/2.0/cassandra/operations/ops_add_node_to_cluster_t.html然后我按照这篇文章https://docs.datastax.com/en/archived/cassandra/2.0/cassandra/operations/ops_add_node_to_cluster_t.html将新节点添加到集群

the parameters I've set in the new node,我在新节点中设置的参数,

cluster_name, 
seeds (without itself), 
listen_address (its ip), 
start_native_transport: true, 
endpoint_snitch: GossipingPropertyFileSnitch, 
rpc_address (its ip)

the service fails with logs服务失败并显示日志

2020-08-05 03:32:53,815 ERROR [main] ElassandraDaemon.java:585 main Exception
java.lang.RuntimeException: Unable to gossip with any peers
    at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1435)

then I changed the configuration by adding new node ip to seeds.然后我通过将新节点 ip 添加到种子来更改配置。 the service is working fine but the nodetool status (on new node) show only itself and no ERROR in /var/cassandra/system.log.该服务工作正常,但 nodetool 状态(在新节点上)仅显示自身,在 /var/cassandra/system.log 中没有错误。 In the other hands, the new node is not visible in the existed two nodes.另一方面,新节点在现有的两个节点中不可见。

I've seen this quite a bit and it's usually environmental rather than a Cassandra issue.我已经看到了很多,它通常是环境问题,而不是 Cassandra 问题。

Check that there's bi-directional traffic between nodes on the listen_address IPs and that they can contact each other on gossip port 7000 .检查listen_address IP 上的节点之间是否存在双向流量,并且它们可以在 gossip 端口7000上相互联系。

You mostly want to eliminate software/hardware firewalls blocking the traffic.您最想消除阻止流量的软件/硬件防火墙。 Otherwise, ensure that network connectivity exists.否则,请确保存在网络连接。

I've discussed this in detail in this post if it helps you -- https://community.datastax.com/questions/7413/ .如果对您有帮助,我已经在这篇文章中详细讨论了这一点——https://community.datastax.com/questions/7413/ Cheers!干杯!

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

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