apache/cassandra · error · IllegalStateException

No configured daemon

Error message

No configured daemon

What it means

IllegalStateException from startNativeTransport: the StorageService daemon reference is null, i.e., CassandraServiceDaemon/CassandraDaemon was never wired into StorageService. Native transport cannot be started without a configured daemon.

Source

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

            Gossiper.instance.forceNewerGeneration();
            Gossiper.instance.start((int) (currentTimeMillis() / 1000), true);
        }
    }

    // should only be called via JMX
    public boolean isGossipRunning()
    {
        return Gossiper.instance.isEnabled();
    }

    public synchronized void startNativeTransport()
    {
        checkServiceAllowedToStart("native transport");

        if (daemon == null)
        {
            throw new IllegalStateException("No configured daemon");
        }

        try
        {
            daemon.startNativeTransport();
        }
        catch (Exception e)
        {
            throw new RuntimeException("Error starting native transport: " + e.getMessage());
        }
    }

    public void stopNativeTransport(boolean force)
    {
        if (daemon == null)
        {
            throw new IllegalStateException("No configured daemon");
        }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Wait until the node finished startup (log line 'Startup complete' / StorageService.OperationMode NORMAL) before invoking startNativeTransport.
  2. If embedded, ensure CassandraDaemon.getInstance().init()/start() has run so the daemon is set.
  3. If daemon is null because startup failed, fix the underlying startup error first (check system.log) and restart the process.

Example fix

// before
storageService.startNativeTransport(); // early JMX call
// after
if (!storageService.getOperationMode().equals("STARTING") && storageService.isStarted()) {
    storageService.startNativeTransport();
}
Defensive patterns

Strategy: validation

Validate before calling

String mode = (String) jmxConn.getAttribute(storageService, "OperationMode");
boolean started = (boolean) jmxConn.getAttribute(storageService, "Started");
if (!started || "STARTING".equals(mode)) waitUntilNodeReady();

Type guard

boolean canStartNativeTransport(StorageService ss) {
    return ss.isStarted() && !"STARTING".equals(ss.getOperationMode());
}

Try / catch

catch (IllegalStateException e) {
    if (e.getMessage().equals("No configured daemon")) {
        waitForStartupCompletion();
        storageService.startNativeTransport();
        return;
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling startNativeTransport() via JMX or API before CassandraDaemon.init()/setup() completed and assigned the daemon, or in embedded/unit setups where no daemon was configured.

Common situations: JMX automation racing node startup (start native transport before the daemon finished initializing); embedded Cassandra usage that constructs StorageService without a daemon; calling start after a failed setup that left daemon null.

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