在 VM 环境中将节点添加到集群时,是否存在有关 initial_token 冲突的任何已知问题?
我正在研究在 VM 上设置的 4 节点集群。当我们尝试将节点添加到集群时,我们遇到了问题。
在 cassandra.yaml 文件中,initial_token 留空。由于我们正在运行 > 1.0 的 cassandra,因此 auto_bootstrap 默认应该为 true。
据我了解,集群中的每个节点都应在启动时分配一个初始令牌。
这不是我们目前看到的。我们不想为每个节点手动设置 initial_token 的值(有点违背动态的目标。)我们还将分区器设置为随机:partitioner: org.apache.cassandra.dht.RandomPartitioner
我已经概述了我们遵循的步骤和我们在下面看到的结果。有人可以告知我们在这里缺少什么吗?
以下是我们正在采取的详细步骤:
1)杀死所有cassandra实例并删除每个节点上的数据和提交日志文件。
2)启动种子节点(SSSS)
启动良好。
3) 运行 nodetool -h WWWW ring 并查看:
Address DC Rack Status State Load Effective-Ownership Token
S.S.S.S datacenter1 rack1 Up Normal 28.37 GB 100.00% 24360745721352799263907128727168388463
4) XXXX 启动
INFO [GossipStage:1] 2012-11-29 21:16:02,194 Gossiper.java (line 850) Node /X.X.X.X is now part of the cluster
INFO [GossipStage:1] 2012-11-29 21:16:02,194 Gossiper.java (line 816) InetAddress /X.X.X.X is now UP
INFO [GossipStage:1] 2012-11-29 21:16:02,195 StorageService.java (line 1138) Nodes /X.X.X.X and /Y.Y.Y.Y have the same token 113436792799830839333714191906879955254. /X.X.X.X is the new owner
WARN [GossipStage:1] 2012-11-29 21:16:02,195 TokenMetadata.java (line 160) Token 113436792799830839333714191906879955254 changing ownership from /Y.Y.Y.Y to /X.X.X.X
5) 运行 nodetool -h WWWW ring 并查看:
Address DC Rack Status State Load Effective-Ownership Token
113436792799830839333714191906879955254
S.S.S.S datacenter1 rack1 Up Normal 28.37 GB 100.00% 24360745721352799263907128727168388463
W.W.W.W datacenter1 rack1 Up Normal 123.87 KB 100.00% 113436792799830839333714191906879955254
6) YYYY 启动
INFO [GossipStage:1] 2012-11-29 21:17:36,458 Gossiper.java (line 850) Node /Y.Y.Y.Y is now part of the cluster
INFO [GossipStage:1] 2012-11-29 21:17:36,459 Gossiper.java (line 816) InetAddress /Y.Y.Y.Y is now UP
INFO [GossipStage:1] 2012-11-29 21:17:36,459 StorageService.java (line 1138) Nodes /Y.Y.Y.Y and /X.X.X.X have the same token 113436792799830839333714191906879955254. /Y.Y.Y.Y is the new owner
WARN [GossipStage:1] 2012-11-29 21:17:36,459 TokenMetadata.java (line 160) Token 113436792799830839333714191906879955254 changing ownership from /X.X.X.X to /Y.Y.Y.Y
7) 运行 nodetool -h WWWW ring 并查看:
Address DC Rack Status State Load Effective-Ownership Token
113436792799830839333714191906879955254
S.S.S.S datacenter1 rack1 Up Normal 28.37 GB 100.00% 24360745721352799263907128727168388463
Y.Y.Y.Y datacenter1 rack1 Up Normal 123.87 KB 100.00% 113436792799830839333714191906879955254
8) ZZZZ 启动
INFO [GossipStage:1] 2012-11-30 04:52:28,590 Gossiper.java (line 850) Node /Z.Z.Z.Z is now part of the cluster
INFO [GossipStage:1] 2012-11-30 04:52:28,591 Gossiper.java (line 816) InetAddress /Z.Z.Z.Z is now UP
INFO [GossipStage:1] 2012-11-30 04:52:28,591 StorageService.java (line 1138) Nodes /Z.Z.Z.Z and /Y.Y.Y.Y have the same token 113436792799830839333714191906879955254. /Z.Z.Z.Z is the new owner
WARN [GossipStage:1] 2012-11-30 04:52:28,592 TokenMetadata.java (line 160) Token 113436792799830839333714191906879955254 changing ownership from /Y.Y.Y.Y to /Z.Z.Z.Z
9) 运行 nodetool -h WWWW ring 并查看:
Address DC Rack Status State Load Effective-Ownership Token
113436792799830839333714191906879955254
W.W.W.W datacenter1 rack1 Up Normal 28.37 GB 100.00% 24360745721352799263907128727168388463
S.S.S.S datacenter1 rack1 Up Normal 28.37 GB 100.00% 24360745721352799263907128727168388463
Z.Z.Z.Z datacenter1 rack1 Up Normal 123.87 KB 100.00% 113436792799830839333714191906879955254
提前致谢。