0

I am keep getting below error when I tried to run single node or multinode Cassandra cluster.

Single node cluster with default config works fine, however nodetool staus shows 127.0.0.1 as IP Address.

After changing listen_address: 192.168.1.143 (this is my ip address) on cassandra.yaml file I am getting below error.

Exception (java.lang.RuntimeException) encountered during startup: Unable to gossip with any peers
java.lang.RuntimeException: Unable to gossip with any peers
        at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1443)
        at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:547)
        at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:804)
        at org.apache.cassandra.service.StorageService.initServer(StorageService.java:664)
        at org.apache.cassandra.service.StorageService.initServer(StorageService.java:613)
        at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:379)
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:602)
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:691)

2 Answers 2

1

Well, after trying different approaches finally I was able to resolve it and able to run single and 3 node cluster.

Below are the configuration changes you need to make on cassandra.yaml file

First Node
--------------
listen_address: 192.168.1.143 (This should be your server/node IP)
seeds: "192.168.1.143" (For your first node please mention your node IP address)

Second Node
---------------
listen_address: 192.168.1.144 (This should be your server/node IP)
seeds: "192.168.1.143" (specify your first node IP, additionally, you can also mention current IP address ,192.168.1.144)

Third Node
---------------
listen_address: 192.168.1.145 (This should be your server/node IP)
seeds: "192.168.1.143" (specify your first/second node IP, additionally, you can also mention current IP address ,192.168.1.145)

After starting cassandra on all 3 servers, nodetool status returned the following

Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address        Load       Tokens       Owns (effective)  Host ID                               Rack
UN  192.168.1.143  258.83 KiB  256          100.0%            7b3a0644-c8dd-4a47-9186-0237f3725941  rack1
UN  192.168.1.144  309.71 KiB  256          100.0%            e7a11a60-d795-47ee-8d21-7cc21b4cbdca  rack1
UN  192.168.1.145  309.71 KiB  256          100.0%            b2a4545a-f279-r5h7-2fy6-23dk8fg5c8kq  rack1

Hope this helps!!

Sign up to request clarification or add additional context in comments.

Comments

0

Yes, for joining cassandra cluster first time. you should start seed node first then other nodes.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.