{"record":{"id":"81b1b704b34446b8","repo":"apache/cassandra","slug":"node-is-not-yet-bootstrapped-completely","errorCode":null,"errorMessage":"Node is not yet bootstrapped completely","messagePattern":"Node is not yet bootstrapped completely","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/CassandraDaemon.java","lineNumber":916,"sourceCode":"        ClusterMetadata metadata = ClusterMetadata.current();\n        MultiStepOperation<?> startupSequence = metadata.inProgressSequences.get(metadata.myNodeId());\n\n        // We only start transports if bootstrap has completed, and we're not in survey mode, OR if we are in\n        // survey mode and streaming has completed, but we're not using auth.\n        // OR if we have not joined the ring yet.\n        if (startupSequence != null)\n        {\n            if (StorageService.instance.isSurveyMode())\n            {\n                if (!StorageService.instance.readyToFinishJoiningRing() || DatabaseDescriptor.isAuthenticationRequired())\n                {\n                    throw new IllegalStateException(\"Not starting client transports in write_survey mode as it's bootstrapping or \" +\n                                                    \"auth is enabled\");\n                }\n            }\n            else\n            {\n                throw new IllegalStateException(\"Node is not yet bootstrapped completely\");\n            }\n        }\n        else\n        {\n            // Bootstrap with same address is an edge-case here, since we rely on HIBERNATE to prevent writes\n            // toward the bootstrapping replacement, so there's no startup sequence involved.\n            if (StorageService.isReplacingSameAddress() && StorageService.instance.isSurveyMode())\n                return;\n\n            // This node has not joined the ring (i.e. it was started with -Dcassandra.join_ring=false)\n            if (StorageService.instance.isStarting())\n                return;\n\n            if (!SystemKeyspace.bootstrapComplete())\n            {\n                throw new IllegalStateException(\"Node is not yet bootstrapped completely. Use nodetool to check bootstrap\" +\n                                                \" state and resume. For more, see `nodetool help bootstrap`\");\n            }","sourceCodeStart":898,"sourceCodeEnd":934,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/CassandraDaemon.java#L898-L934","documentation":"When a startup sequence is defined and the node is NOT in write_survey mode, validateTransportsCanStart throws this IllegalStateException if client transports are requested before the node has fully bootstrapped. Cassandra guards client transports so queries are not served from a node whose token/ring state is incomplete.","triggerScenarios":"Calling start() or startNativeTransport() on a node that is still bootstrapping (bootstrapComplete not recorded, node outside survey mode) during its startup sequence.","commonSituations":"Restarting a brand-new node while streaming is still in progress; automation (k8s operators, ansible) enabling native transport before bootstrap finishes; a failed/interrupted first bootstrap.","solutions":["Wait for bootstrap to complete: watch nodetool netstats until streaming finishes and the node joins the ring.","If bootstrap is stuck or failed, run `nodetool bootstrap resume` or wipe the data dir and re-bootstrap cleanly.","Delay transport start in automation until the node is in NORMAL/UP status (e.g. via `nodetool status` checks)."],"exampleFix":"// before\nstorageService.startNativeTransport();\n// after\nif (SystemKeyspace.bootstrapComplete()) {\n    storageService.startNativeTransport();\n} else {\n    logger.info(\"Deferring native transport start until bootstrap completes\");\n}","handlingStrategy":"validation","validationCode":"if (!SystemKeyspace.bootstrapComplete())\n    logger.info(\"Bootstrap incomplete; postponing client transport start\");","typeGuard":null,"tryCatchPattern":"try { daemon.start(); } catch (IllegalStateException e) { logger.error(\"Bootstrap not complete: {}\", e.getMessage()); }","preventionTips":["Gate transport start on bootstrap completion in startup automation","Monitor streaming progress on first boot before marking the node ready","Use readiness probes that check ring membership, not just process liveness"],"tags":["cassandra","startup","bootstrap"],"backgroundTag":"invalid-state-transition","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}