apache/cassandra · error · IllegalStateException

Node is not yet bootstrapped completely

Error message

Node is not yet bootstrapped completely

What it means

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.

Source

Thrown at src/java/org/apache/cassandra/service/CassandraDaemon.java:916

        ClusterMetadata metadata = ClusterMetadata.current();
        MultiStepOperation<?> startupSequence = metadata.inProgressSequences.get(metadata.myNodeId());

        // We only start transports if bootstrap has completed, and we're not in survey mode, OR if we are in
        // survey mode and streaming has completed, but we're not using auth.
        // OR if we have not joined the ring yet.
        if (startupSequence != null)
        {
            if (StorageService.instance.isSurveyMode())
            {
                if (!StorageService.instance.readyToFinishJoiningRing() || DatabaseDescriptor.isAuthenticationRequired())
                {
                    throw new IllegalStateException("Not starting client transports in write_survey mode as it's bootstrapping or " +
                                                    "auth is enabled");
                }
            }
            else
            {
                throw new IllegalStateException("Node is not yet bootstrapped completely");
            }
        }
        else
        {
            // Bootstrap with same address is an edge-case here, since we rely on HIBERNATE to prevent writes
            // toward the bootstrapping replacement, so there's no startup sequence involved.
            if (StorageService.isReplacingSameAddress() && StorageService.instance.isSurveyMode())
                return;

            // This node has not joined the ring (i.e. it was started with -Dcassandra.join_ring=false)
            if (StorageService.instance.isStarting())
                return;

            if (!SystemKeyspace.bootstrapComplete())
            {
                throw new IllegalStateException("Node is not yet bootstrapped completely. Use nodetool to check bootstrap" +
                                                " state and resume. For more, see `nodetool help bootstrap`");
            }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Wait for bootstrap to complete: watch nodetool netstats until streaming finishes and the node joins the ring.
  2. If bootstrap is stuck or failed, run `nodetool bootstrap resume` or wipe the data dir and re-bootstrap cleanly.
  3. Delay transport start in automation until the node is in NORMAL/UP status (e.g. via `nodetool status` checks).

Example fix

// before
storageService.startNativeTransport();
// after
if (SystemKeyspace.bootstrapComplete()) {
    storageService.startNativeTransport();
} else {
    logger.info("Deferring native transport start until bootstrap completes");
}
Defensive patterns

Strategy: validation

Validate before calling

if (!SystemKeyspace.bootstrapComplete())
    logger.info("Bootstrap incomplete; postponing client transport start");

Try / catch

try { daemon.start(); } catch (IllegalStateException e) { logger.error("Bootstrap not complete: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Calling start() or startNativeTransport() on a node that is still bootstrapping (bootstrapComplete not recorded, node outside survey mode) during its startup sequence.

Common situations: 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.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/81b1b704b34446b8. Report an issue: GitHub.