apache/cassandra · info

Starting gossip by operator request

Error message

Starting gossip by operator request

What it means

INFO/WARN log from StorageService.startGossiping() when an operator re-enables gossip (nodetool enablegossip) on a node whose gossip is not currently running. Before starting, checkServiceAllowedToStart() validates the node's lifecycle state; starting gossip while the node is in a starting/joining state can conflict with an in-progress bootstrap unless the joinRing flag allows it.

Source

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

            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();

            // shouldn't be called before these are set if we intend to join the ring/are in the process of doing so
            if (!isStarting() || joinRing)
                assert validTokens : "Cannot start gossiping for a node intended to join without valid tokens";

            if (validTokens)
            {
                List<Pair<ApplicationState, VersionedValue>> states = new ArrayList<>();
                states.add(Pair.create(ApplicationState.TOKENS, valueFactory.tokens(tokens)));
                states.add(Pair.create(ApplicationState.STATUS_WITH_PORT, valueFactory.normal(tokens)));
                states.add(Pair.create(ApplicationState.STATUS, valueFactory.normal(tokens)));
                logger.info("Node {} jump to NORMAL", getBroadcastAddressAndPort());
                Gossiper.instance.addLocalApplicationStates(states);
            }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. If intentional, nothing to fix; monitor 'nodetool status' until the node reports UP/NORMAL.
  2. If the node is still bootstrapping, let bootstrap complete before enabling gossip, or use the documented join procedure.
  3. Check logs for the IllegalStateException raised when gossip start is attempted from a disallowed state.
  4. Ensure system.local/saved tokens are intact if token validation fails after this log.
Defensive patterns

Strategy: validation

Validate before calling

boolean canStart = !storageService.isGossipRunning()
    && (storageService.isStarting() == false || joinRingAllowed);

Try / catch

try { storageService.startGossiping(); } catch (IllegalStateException e) { log.warn("gossip start rejected", e); }

Prevention

When it happens

Trigger: startGossiping() invoked while !isGossipRunning(), after checkServiceAllowedToStart("gossip") passes; the method then loads saved tokens and validates the node is not mid-join improperly.

Common situations: Recovery after a 'disablegossip' maintenance step; scripted startup recovery; accidentally starting gossip on a node that is still bootstrapping, expecting it to rejoin mid-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/41cab2bb40d25e70. Report an issue: GitHub.