我正在尝试在两台主机上安装cassandra并收到以下错误
INFO 17:51:13,086 Using TFramedTransport with a max frame size of 15728640 bytes.
INFO 17:51:13,097 Using synchronous/threadpool thrift server on localhost : 9160
INFO 17:51:13,098 Listening for thrift clients...
INFO 17:51:14,759 Node /10.20.5.129 is now part of the cluster
INFO 17:51:14,766 InetAddress /10.20.5.129 is now UP
ERROR 17:51:14,778 Exception in thread Thread[GossipStage:1,5,main]
java.lang.RuntimeException: Host ID collision between active endpoint /10.20.5.194 and /10.20.5.129 (id=b569339e-45e2-4819-a44b-a3948e0020b7)
at org.apache.cassandra.locator.TokenMetadata.updateHostId(TokenMetadata.java:229)
at org.apache.cassandra.service.StorageService.handleStateNormal(StorageService.java:1312)
at org.apache.cassandra.service.StorageService.onChange(StorageService.java:1169)
at org.apache.cassandra.service.StorageService.onJoin(StorageService.java:1914)
at org.apache.cassandra.gms.Gossiper.handleMajorStateChange(Gossiper.java:806)
at org.apache.cassandra.gms.Gossiper.applyStateLocally(Gossiper.java:884)
at org.apache.cassandra.gms.GossipDigestAck2VerbHandler.doVerb(GossipDigestAck2VerbHandler.java:50)
at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
INFO 17:51:14,936 Enqueuing flush of Memtable-schema_keyspaces@1580255587(389/389 serialized/live bytes, 11 ops)
INFO 17:51:14,937 Writing Memtable-schema_keyspaces@1580255587(389/389 serialized/live bytes, 11 ops)
INFO 17:51:14,952 Completed flushing /export/home/apps/ebookplus/viewppe3/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-ib-3-Data.db (284 bytes) for commitlog position ReplayPosition(segmentId=1367445071923, position=54137)
INFO 17:51:14,953 Enqueuing flush of Memtable-schema_columnfamilies@1320403535(23066/23066 serialized/live bytes, 379 ops)
INFO 17:51:14,954 Writing Memtable-schema_columnfamilies@1320403535(23066/23066 serialized/live bytes, 379 ops)
INFO 17:51:14,976 Completed flushing /export/home/apps/ebookplus/viewppe3/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-ib-3-Data.db (4854 bytes) for commitlog position ReplayPosition(segmentId=1367445071923, position=54137)
INFO 17:51:14,977 Enqueuing flush of Memtable-schema_columns@1116560045(22154/22154 serialized/live bytes, 337 ops)
INFO 17:51:14,978 Writing Memtable-schema_columns@1116560045(22154/22154 serialized/live bytes, 337 ops)
INFO 17:51:15,003 Completed flushing /export/home/apps/ebookplus/viewppe3/cassandra/data/system/schema_columns/system-schema_columns-ib-3-Data.db (3900 bytes) for commitlog position ReplayPosition(segmentId=1367445071923, position=54137)
请注意;我正在使用以下配置进行此设置。
NODE0
cluster_name:'TestCluster' initial_token:0 seed_provider: - 种子:“10.20.5.129,10.20.5.196” listen_address:10.20.5.129 rpc_address:10.20.5.194 endpoint_snitch:RackInferringSnitch
节点1
cluster_name:'TestCluster' initial_token:1537228672809129301 seed_provider: - 种子:“10.20.5.129,10.20.5.196” listen_address:10.20.5.194 rpc_address:10.20.5.194 endpoint_snitch:RackInferringSnitch
请帮忙。
答案 0 :(得分:1)
我的理解是说错误的令牌分配。并且这些值存储在其System空间中。所以擦洗它们然后重新开始。
对于令牌分配,您可以查看cassandra visual ring
答案 1 :(得分:0)
我建议清空存储所有提交日志,提示和保存的缓存的“数据”文件夹。
基本上,就我而言,我通过运行以下命令清除了所有节点的数据:
ubuntu@ds201-node1:~/node1/data$ rm -rf *
接下来,我通过运行以下命令在节点中重新启动cassandra:
ubuntu@ds201-node1:~/node1/bin$ ./dse cassandra