Apache Cassandra: Unable to gossip with any seeds

Viewed 55459

I have built Cassandra server 2.0.3, then run it. It is starting and then stopped with messages:

X:\MyProjects\cassandra\apache-cassandra-2.0.3-src\bin>cassandra.bat >log.txt
java.lang.RuntimeException: Unable to gossip with any seeds
        at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1160)
        at org.apache.cassandra.service.StorageService.checkForEndpointCollision
(StorageService.java:416)
        at org.apache.cassandra.service.StorageService.joinTokenRing(StorageServ
ice.java:608)
        at org.apache.cassandra.service.StorageService.initServer(StorageService
.java:576)
        at org.apache.cassandra.service.StorageService.initServer(StorageService
.java:475)
        at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.ja
va:346)
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon
.java:461)
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.jav
a:504)

What I can change to run it?

16 Answers

I experienced this error today...

I could not find any reason for the error other than timing issues.

I restarted many times and after a while it sticked. It looks like they expect a bi-directional communication on the gossip channel and if it does not happen quickly enough (which looks like a very small amount of time to me) then they drop the line and generate that error.

In my case I just upgraded my software and restarted the computer. So it was clearly not a connection issue between the computers (I have firewalls and SSL, to complicate matters) and the node was connected before... So the one entry I found in that regard from datastax did not apply...

https://support.datastax.com/hc/en-us/articles/209691483-Bootstap-fails-with-Unable-to-gossip-with-any-seeds-yet-new-node-can-connect-to-seed-nodes

In our case ssl was enabled, and cassandra.yaml configuration looks fine as per above comments. Then we enabled ssl debugging by by adding below jvm paramter in cassandra-env.sh -Djavax.net.debug=ssl:handshake

After starting the node again we noticed below in cassandra log file

MessagingService-Outgoing-geo2_host/xx.xx.xx.xx, Exception while waiting for close javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown

After further investigating the ssl debug logs we got to know that the certificate was not valid. After fixing this ssl issue node was able to join the cluster.

Thanks to elvingt

His answer just remind me , I need to verify that all node needs to be able to talk to each other.
https://support.datastax.com/hc/en-us/articles/209691483-Bootstap-fails-with-Unable-to-gossip-with-any-seeds-yet-new-node-can-connect-to-seed-nodes

Gossip communications must be bi-directional.

To verify use this commnd, and you need test from BOTH SIDE

nc -vz {your_node_ip} 7000

Then I recollect that I turned on my ubuntu firewall last night. I open it by

sudo ufw allow 7000/tcp

And it is working now

Getting error during startup/bootstrap

Unable to gossip with any seeds

indicates there is some issue with broadcast_address. broadcast_address is responsible for communication with other nodes not with clients.

This address must be set in seed node(mandatory for seed node), If you are using cloud VMs you might have different IPs(public and private) hence its recommended to use your private IPs for broadcast_address this will save your n/w cost as well.

# Address to broadcast to other Cassandra nodes
# Leaving this blank will set it to the same value as listen_address
broadcast_address: 10.11.xx.xxx

In my scenario I was using IBM and once I set broadcast_address in seed nodes issue got resolved.

Please make sure you are starting your seed node first then other node, this order is mandatory.

in cassandra.yaml changing listen_address value from localhost to domainName solved my issue

Related