Cassandra集群设置 - 无法与任何种子闲话 [英] Cassandra Cluster Set up - Unable to gossip with any seeds
问题描述
我想设置一个3节点Cassandra VM群集。
我从datastax包安装cassandra到个人vms,然后修改以下内容:
-
Seed - vm1(在所有vm配置中设置IP地址)
-
使用listen_address作为主机ip更新了配置,添加了rpc_broadcast_address
-
在防火墙规则中添加了cassandra端口以允许inter vm通信
也尝试使用SSH连接到vms
在尝试所有这些之后,我启动了cassandra种子节点当我使用nodetool检查状态时,我看到节点状态是UN(Up / Normal)。
然后我在其他集群节点上启动cassandra。它无法启动与无法八卦与任何种子错误。
任何帮助将非常感谢!
堆栈跟踪:
java.lang.RuntimeException:无法使用任何种子gossip
在org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1334)〜[apache-cassandra-2.1.9.jar: 2.1.9]
at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:540)〜[apache-cassandra-2.1.9.jar:2.1.9]
at org。 apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:783)〜[apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.StorageService.initServer(StorageService .java:720)〜[apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:611)〜[apache-cassandra- 2.1.9.jar:2.1.9]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378)[apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:537)[apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.CassandraDaemon .main(CassandraDaemon.java:626)[apache-cassandra-2.1.9.jar:2.1.9]
谢谢!
好的,花了一天时间之后,发现了问题。这的确是一个防火墙问题。除了在iptables中输入规则之外,还要确保ACCEPT规则出现在REJECT规则 - >顺序问题之前。
在更改顺序并重新启动iptables服务和cassandra之后,它开始工作,节点能够使用种子进行八卦。
I am trying to set up a 3 node Cassandra VM cluster.
I installed cassandra from datastax package on individual vms and then modified the following:
Seed - vm1 (set the ip address in all the vm configs)
Updated the config with listen_address as the host ip, added the rpc_broadcast_address
Added the cassandra ports in the firewall rules to allow for inter vm communication
Also tried connecting to the vms using SSH
After trying all of this, I started the cassandra seed node, it comes up fine and when I check for the status using nodetool, I see that the node status is UN (Up/Normal). I then start cassandra on the other cluster nodes. It fails to start up with unable to gossip with any seeds error. Any help will be greatly appreciated!
Stack Trace:
java.lang.RuntimeException: Unable to gossip with any seeds
at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1334) ~[apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:540) ~[apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:783) ~[apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:720) ~[apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:611) ~[apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378) [apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:537) [apache-cassandra-2.1.9.jar:2.1.9]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:626) [apache-cassandra-2.1.9.jar:2.1.9]
Thanks!
Ok, after spending a day on this, found the issue. It was indeed a firewall issue. In addition to entering the rules in iptables, ensure that the ACCEPT rules appear before the REJECT rules -> ordering matters. After changing the order and restarting the iptables service and cassandra, it started working, the nodes were able to gossip with the seed.
这篇关于Cassandra集群设置 - 无法与任何种子闲话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!