apache/cassandra · warning

Disabling gossip while native transport is still active is u

Error message

Disabling gossip while native transport is still active is unsafe

What it means

WARN log from StorageService.stopGossiping() warning that gossip is being disabled while the native transport (CQL client protocol) is still running. The call still proceeds, but the node keeps accepting client connections while no longer exchanging membership/ring state via gossip, which is unsafe and can cause stale routing and inconsistent views.

Source

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

    public void unregister(IEndpointLifecycleSubscriber subscriber)
    {
        lifecycleSubscribers.remove(subscriber);
    }

    // should only be called via JMX
    public void stopGossiping()
    {
        if (isGossipRunning())
        {
            if (!isNormal() && joinRing)
                throw new IllegalStateException("Unable to stop gossip because the node is not in the normal state. Try to stop the node instead.");

            logger.warn("Stopping gossip by operator request");

            if (isNativeTransportRunning())
            {
                logger.warn("Disabling gossip while native transport is still active is unsafe");
            }

            Gossiper.instance.stop();
        }
    }

    // should only be called via JMX
    public synchronized void startGossiping()
    {
        if (!isGossipRunning())
        {
            checkServiceAllowedToStart("gossip");

            logger.warn("Starting gossip by operator request");
            Collection<Token> tokens = SystemKeyspace.getSavedTokens();

            boolean validTokens = tokens != null && !tokens.isEmpty();

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Re-enable gossip ('nodetool enablegossip') or disable native transport ('nodetool disablebinary') to reach a consistent state.
  2. Adjust shutdown scripts to stop native transport before gossip.
  3. Plan a restart if the node served traffic during the gossip-outage window to refresh ring state.

Example fix

// before (shell)
nodetool disablegossip
// after (shell)
nodetool disablebinary
nodetool disablegossip
Defensive patterns

Strategy: validation

Validate before calling

if (storageService.isNativeTransportRunning()) {
    throw new IllegalStateException("Disable native transport before disabling gossip");
}

Prevention

When it happens

Trigger: stopGossiping() called when isNativeTransportRunning() returns true — i.e. operator disables gossip before stopping the CQL native protocol server.

Common situations: Incomplete shutdown sequences where an operator or script disables gossip but forgets native transport; partial transport shutdowns via JMX during incident response.

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