Cassandra新节点无法加入集群

Cassandra new node unable to join the cluster

实际上我正在添加新的 Elassandra 节点,但问题显然与 Cassandra 配置有关。

以前,我在集群中有两个节点。彼此之间有着完美的联系。使用 nodetool status 还 returns 两个节点信息。

然后我按照这篇文章将新节点添加到集群中https://docs.datastax.com/en/archived/cassandra/2.0/cassandra/operations/ops_add_node_to_cluster_t.html

我在新节点中设置的参数,

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

服务失败并显示日志

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)

然后我通过向种子添加新节点 ip 来更改配置。该服务工作正常,但 nodetool 状态(在新节点上)仅显示自身,/var/cassandra/system.log 中没有错误。另一方面,新节点在现有的两个节点中是不可见的。

我见过很多次,这通常是环境问题,而不是 Cassandra 问题。

检查 listen_address IP 上的节点之间是否存在 bi-directional 流量,并且它们可以在 gossip 端口 7000.

上相互联系

您主要想消除 software/hardware 阻止流量的防火墙。否则,请确保存在网络连接。

如果对您有帮助的话,我已经在此 post 中详细讨论了这个问题 -- https://community.datastax.com/questions/7413/。干杯!