apache/cassandra · error · RuntimeException

Can't abort bootstrap for - it is alive

Error message

Can't abort bootstrap for  - it is alive

What it means

Thrown by StorageService.abortBootstrap when the target node is reachable: the endpoint is known to Gossiper AND the failure detector reports it alive. Bootstrap can only be aborted for nodes that are dead/gone, because a live node participates in its own join protocol and aborting under it would corrupt cluster state.

Source

Thrown at src/java/org/apache/cassandra/service/StorageService.java:1673

            return true;
        }
        else
        {
            logger.info("Resuming bootstrap is requested, but the node is already bootstrapped.");
            return false;
        }
    }

    public void abortBootstrap(String nodeStr, String endpointStr)
    {
        logger.info("Aborting bootstrap for {}", StringUtils.isEmpty(nodeStr) ? endpointStr : nodeStr);
        ClusterMetadata metadata = ClusterMetadata.current();
        NodeId nodeId = parseNodeIdOrEndpoint(metadata, nodeStr, endpointStr);
        InetAddressAndPort endpoint = metadata.directory.endpoint(nodeId);
        if (endpoint == null)
            throw new IllegalArgumentException("Can't abort bootstrap for " + nodeId + " - it does not exist in cluster metadata");
        if (Gossiper.instance.isKnownEndpoint(endpoint) && FailureDetector.instance.isAlive(endpoint))
            throw new RuntimeException("Can't abort bootstrap for " + nodeId + " - it is alive");
        NodeState nodeState = metadata.directory.peerState(nodeId);
        switch (nodeState)
        {
            case REGISTERED:
            case BOOTSTRAPPING:
            case BOOT_REPLACING:
                if (metadata.inProgressSequences.contains(nodeId))
                {
                    MultiStepOperation<?> seq = metadata.inProgressSequences.get(nodeId);
                    if (seq.kind() != MultiStepOperation.Kind.JOIN && seq.kind() != MultiStepOperation.Kind.REPLACE)
                        throw new RuntimeException("Can't abort bootstrap for " + nodeId + " since it is not bootstrapping");
                    ClusterMetadataService.instance().commit(new CancelInProgressSequence(nodeId));
                }
                ClusterMetadataService.instance().commit(new Unregister(nodeId, EnumSet.of(REGISTERED, BOOTSTRAPPING, BOOT_REPLACING), ClusterMetadataService.instance().placementProvider()));
                break;
            default:
                throw new RuntimeException("Can't abort bootstrap for node " + nodeId + " since the state is " + nodeState);
        }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Stop the joining Cassandra node (systemctl stop cassandra / nodetool drain then stop) and wait for it to be marked down, then re-run abortbootstrap
  2. Verify the node is actually down with `nodetool gossipinfo` and the failure detector before aborting
  3. If the node just died, wait for gossip/phi-convictal timeout so FailureDetector reports it dead
  4. If the node is alive and you want it in the cluster, do not abort - let the bootstrap finish or use maintenance operations instead

Example fix

// before
nodetool abortbootstrap 10.0.0.5   # node still running
// after
ssh 10.0.0.5 'nodetool drain && systemctl stop cassandra'
# wait until node shows DOWN
nodetool abortbootstrap 10.0.0.5
Defensive patterns

Strategy: validation

Validate before calling

// Check the node is DOWN before aborting
// nodetool gossipinfo | grep <endpoint>  and verify failure-detector state
boolean alive = /* probe node or check `nodetool status` shows DN */;
if (alive) throw new IllegalStateException("Stop the bootstrapping node first");

Try / catch

try {
    probe.abortBootstrap(nodeId);
} catch (RuntimeException e) {
    if (e.getMessage().contains("it is alive"))
        log.warn("Node still alive - stop it and wait for conviction before aborting");
    else throw e;
}

Prevention

When it happens

Trigger: Running `nodetool abortbootstrap <node>` while the bootstrapping node is up and gossiping - e.g. trying to abort a slow join instead of first stopping the node.

Common situations: Operator wants to cancel an in-progress bootstrap but forgets the joining node must be shut down first; failure detector briefly reports the node alive due to gossip lag after a crash; firewall keeps the node pingable while Cassandra is半 down.

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/35e9fc1bb4120ab5. Report an issue: GitHub.