{"record":{"id":"629b8cb26852e7a9","repo":"apache/cassandra","slug":"found-no-candidates-during-initialization-check-i","errorCode":null,"errorMessage":"Found no candidates during initialization. Check if the seeds are up: %s","messagePattern":"Found no candidates during initialization\\. Check if the seeds are up: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/tcm/Startup.java","lineNumber":442,"sourceCode":"     * it is aware of. After discovery, the node with a smallest ip address will move to propose itself as\n     * a CMS initiator, and attempt to establish a CMS in via two-phase commit protocol.\n     */\n    public static void initializeForDiscovery(Runnable initMessaging)\n    {\n        initMessaging.run();\n        logger.debug(\"Discovering other nodes in the system\");\n        Discovery.DiscoveredNodes candidates = Discovery.instance.discover();\n        if (candidates.kind() == Discovery.DiscoveredNodes.Kind.KNOWN_PEERS)\n        {\n            logger.debug(\"Got candidates: \" + candidates);\n            Optional<InetAddressAndPort> option = candidates.nodes().stream().min(InetAddressAndPort::compareTo);\n            InetAddressAndPort min;\n            if (!option.isPresent())\n            {\n                if (DatabaseDescriptor.getSeeds().contains(FBUtilities.getBroadcastAddressAndPort()))\n                    min = FBUtilities.getBroadcastAddressAndPort();\n                else\n                    throw new IllegalArgumentException(String.format(\"Found no candidates during initialization. Check if the seeds are up: %s\", DatabaseDescriptor.getSeeds()));\n            }\n            else\n            {\n                min = option.get();\n            }\n\n             // identify if you need to start the vote\n            if (min.equals(FBUtilities.getBroadcastAddressAndPort()) || FBUtilities.getBroadcastAddressAndPort().compareTo(min) < 0)\n            {\n                Election.instance.nominateSelf(candidates.nodes(),\n                                               Collections.singleton(FBUtilities.getBroadcastAddressAndPort()),\n                                               ClusterMetadata.current(),\n                                               false);\n            }\n        }\n\n        while (!ClusterMetadata.current().epoch.isAfter(Epoch.FIRST))\n        {","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/Startup.java#L424-L460","documentation":"Startup.initializeForDiscovery needs a starting candidate endpoint (the lowest, deterministic pick) to begin cluster discovery. If no candidate option is present and this node is not itself a seed (its broadcast address is not in DatabaseDescriptor.getSeeds()), there is nobody to discover from, so it throws IllegalArgumentException 'Found no candidates during initialization. Check if the seeds are up'. This means a non-seed node has no reachable seed to bootstrap discovery against.","triggerScenarios":"initializeForDiscovery resolves no candidate endpoint: DatabaseDescriptor.getSeeds() does not contain this node's broadcast address and the optional candidate is empty (no seeds configured or none resolvable); a non-seed node starts with an empty/invalid seed list.","commonSituations":"Fresh node started with seeds left empty; all configured seeds are down or DNS-unresolvable at startup; hostname-based seeds that fail resolution; node misconfigured as non-seed but expected to form a new cluster.","solutions":["Ensure cassandra.yaml seeds lists at least one reachable, up-to-date seed for the cluster.","If this node should form a new cluster, add its own broadcast address to the seeds list.","Verify seed hostnames resolve and are reachable (ping/nc) before restart.","Start the seed nodes first, then the non-seed node.","Check startup logs for DNS/connection failures against each seed to pinpoint the unreachable one."],"exampleFix":"# before: empty seeds on a joining node\nseed_provider:\n  - seeds: []\n# after: list live seeds\nseed_provider:\n  - class_name: org.apache.cassandra.locator.SimpleSeedProvider\n    parameters:\n      - seeds: \"10.0.0.1:7000,10.0.0.2:7000\"","handlingStrategy":"validation","validationCode":"// pre-start check: a non-seed node must have at least one reachable seed\nif (!DatabaseDescriptor.getSeeds().contains(FBUtilities.getBroadcastAddressAndPort())\n    && DatabaseDescriptor.getSeeds().isEmpty())\n    throw new ConfigurationException(\"Non-seed node requires a configured seed\");","typeGuard":null,"tryCatchPattern":"try { Startup.initializeForDiscovery(...); }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Found no candidates\")) {\n        // fix seeds in cassandra.yaml, confirm seeds are up, restart\n    } else throw e;\n}","preventionTips":["Never leave seeds empty on joining nodes","Ensure seeds start before non-seeds","Monitor seed DNS resolution","Add own address to seeds when bootstrapping a new cluster"],"tags":["tcm","discovery","seeds","startup","bootstrap"],"backgroundTag":"missing-required-config-field","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}