2
votes

I am trying to install cassandra on two hosts and getting following error

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)

Please note; I am using following configuration for this setup.

node0

cluster_name: 'TestCluster' initial_token: 0 seed_provider: - seeds: "10.20.5.129,10.20.5.196" listen_address: 10.20.5.129 rpc_address: 10.20.5.194 endpoint_snitch: RackInferringSnitch

node1

cluster_name: 'TestCluster' initial_token: 1537228672809129301 seed_provider: - seeds: "10.20.5.129,10.20.5.196" listen_address: 10.20.5.194 rpc_address: 10.20.5.194 endpoint_snitch: RackInferringSnitch

Please help.

2

2 Answers

1
votes

My understanding says wrong token assignment. And these values are stored in their System keyspace. So scrub them and start again.

For token assignment may be you can have a look cassandra visual ring

0
votes

I would suggest to empty the "data" folder where is stored all commitlogs, hints and saved cache.

Basically, in my case I cleaned up the data of all nodes by running the command:

ubuntu@ds201-node1:~/node1/data$ rm -rf *

Next, I just restart cassandra in node by running the command:

ubuntu@ds201-node1:~/node1/bin$ ./dse cassandra