Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Normal
Description
Trying to boostrap a node for which no initial token has been set result in:
java.lang.RuntimeException: No other nodes seen! Unable to bootstrap.If you intended to start a single-node cluster, you should make sure your broadcast_address (or listen_address) is listed as a seed. Otherwise, you need to determine why the seed being contacted has no knowledge of the rest of the cluster. Usually, this can be solved by giving all nodes the same seed list. at org.apache.cassandra.dht.BootStrapper.getBootstrapSource(BootStrapper.java:154) at org.apache.cassandra.dht.BootStrapper.getBalancedToken(BootStrapper.java:135) at org.apache.cassandra.dht.BootStrapper.getBootstrapTokens(BootStrapper.java:115) at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:603) at org.apache.cassandra.service.StorageService.initServer(StorageService.java:490) at org.apache.cassandra.service.StorageService.initServer(StorageService.java:386) at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:305) at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:393) at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:436)
This has been broken by CASSANDRA-4416. More specifically, now that we storage the system metadata in the schema on startup, the check
// if we see schema, we can proceed to the next check directly if (!Schema.instance.getVersion().equals(Schema.emptyVersion)) { logger.debug("got schema: {}", Schema.instance.getVersion()); break; }
in StorageService.joinTokenRing is broken. This result in the node trying to check the Load map to pick a token before any gossip state has been received.
Note sure what is the best fix (an easy would be to always wait RING_DELAY before attempting to pick the token, at least in the case where an initial token isn't set, but that's a big hammer).