apache/cassandra · error · IllegalStateException

Can't proceed from the state

Error message

Can't proceed from the state 

What it means

The default branch of Startup.java's resume switch: the node's ClusterMetadata peer state is not one of the resumable states (JOINED, BOOTSTRAPPING, BOOT_REPLACING, LEAVING, MOVING), so startup cannot proceed and throws IllegalStateException. This guards against booting from states like LEFT/REMOVED where resuming is meaningless.

Source

Thrown at src/java/org/apache/cassandra/tcm/Startup.java:716

                break;
            case BOOTSTRAPPING:
            case BOOT_REPLACING:
                if (finishJoiningRing)
                {
                    throw new IllegalStateException("Expected to complete startup sequence, but did not. " +
                                                    "Can't proceed from the state " + metadata.directory.peerState(self));
                }
                break;
            case LEAVING:
                logger.info("Node is currently being decommissioned, resume with `nodetool decommission`");
                StorageService.instance.markDecommissionFailed();
                break;
            case MOVING:
                logger.info("Node is currently moving, resume with nodetool move --resume or abort with nodetool move --abort");
                StorageService.instance.markMoveFailed();
                break;
            default:
                throw new IllegalStateException("Can't proceed from the state " + metadata.directory.peerState(self));
        }
    }

    /**
     * Returns:
     *   * {@link PrepareReplace}, the first step of the multi-step replacement process sequence, if {@param finishJoiningRing} is true
     *   * {@link UnsafeJoin}, a single-step join transformation, if {@param shouldBootstrap} is set to false, and the node is not
     *     in a write survey mode (in other words {@param finishJoiningRing} is true. This mode is mostly used for testing, but can
     *     also be used to quickly set up a fresh cluster.
     *   * and {@link PrepareJoin}, the first step of the multi-step join process, otherwise.
     */
    private static Transformation getInitialTransformation(boolean finishJoiningRing, boolean shouldBootstrap, boolean isReplacing)
    {
        ClusterMetadata metadata = ClusterMetadata.current();
        if (isReplacing)
        {
            InetAddressAndPort replacingEndpoint = DatabaseDescriptor.getReplaceAddress();
            if (FailureDetector.instance.isAlive(replacingEndpoint))

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. If the node was decommissioned/removed, wipe its data directory and bootstrap as a new node
  2. Check the peer state in ClusterMetadata to identify the exact unresumable state
  3. Upgrade/downgrade to a version whose Startup switch understands the recorded state
  4. If metadata is corrupted, restore from backup or re-initialize the TCM metadata carefully (risky; consult CMS operator docs)
Defensive patterns

Strategy: validation

Validate before calling

NodeState s = ClusterMetadata.current().directory.peerState(self);
if (s == NodeState.LEFT || s == NodeState.REMOVED)
    throw new IllegalStateException("Node was removed; wipe data and re-bootstrap");

Try / catch

try { startup(); }
catch (IllegalStateException e) {
    if (e.getMessage().startsWith("Can't proceed from the state")) { /* inspect peer state, re-bootstrap */ }
    else throw e;
}

Prevention

When it happens

Trigger: Starting a node whose recorded peer state in ClusterMetadata is an unhandled value (e.g. LEFT, REMOVED, unknown enum value) during the TCM startup sequence.

Common situations: Restarting a node that was decommissioned or removed from the cluster; corrupted/stale ClusterMetadata on disk; running an older binary against metadata written by a newer version with extra states.

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