apache/cassandra · info

Node is not in gossip, not running GossipTask

Error message

Node {} is not in gossip, not running GossipTask

What it means

A logger.warn (not an exception): Gossiper's GossipTask.run() checks that the local node's own EndpointState exists in endpointStateMap before each gossip round; if absent, it warns and returns without gossiping. Normally the node seeds its own state at startup; a missing entry means gossip was not fully initialized (e.g., during shutdown, or startGossiping was invoked without proper local state setup).

Solutions

  1. If seen during shutdown, it is benign — ignore; the task exits as the node stops.
  2. If seen while running: restart Cassandra so local gossip state is fully re-initialized.
  3. Check that broadcast_address/broadcast_rpc_address settings are stable and not changed between restarts.
  4. Re-enable gossip properly (`nodetool enablegossip`) and confirm with `nodetool status` that the node sees its own state.

Example fix

// before: scripted toggle causing race
nodetool disablegossip && nodetool enablegossip  // task may fire with no local state
// after: allow orderly re-init
nodetool disablegossip; sleep 5; nodetool enablegossip; nodetool status  # verify own node is UP
Defensive patterns

Strategy: validation

Validate before calling

// before scripted gossip toggles, ensure gossip is stable
nodetool status | grep -q "$(hostname -i)" || { echo 'local endpoint missing from gossip'; exit 1; }

Prevention

When it happens

Trigger: The periodic gossip loop runs while endpointStateMap.get(getBroadcastAddressAndPort()) is null — typically when the node is shutting down (gossip state removed) but the scheduled task still fires, or when gossip internals were manipulated (startGossiping/stopGossiping, shadow round) without re-seeding local state.

Common situations: Node shutdown or `nodetool gossipoff`/drain racing the gossip timer; test harnesses restarting gossip without reinitializing; broadcast address changing (IP change) so the expected key is no longer in the map; scripted `nodetool disablegossip` + enable sequences hitting a race.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/0f80ea0188ca0a0f. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/gms/Gossiper.java:275

    public Map<InetAddressAndPort, EndpointState> getEndpointStates()
    {
        return endpointStateMap;
    }

    private class GossipTask implements Runnable
    {
        public void run()
        {
            try
            {
                taskLock.lock();

                /* Update the local heartbeat counter. */
                EndpointState epstate = endpointStateMap.get(getBroadcastAddressAndPort());
                if (epstate == null)
                {
                    logger.warn("Node {} is not in gossip, not running GossipTask", getBroadcastAddressAndPort());
                    return;
                }
                epstate.updateHeartBeat();
                if (logger.isTraceEnabled())
                    logger.trace("My heartbeat is now {}", endpointStateMap.get(FBUtilities.getBroadcastAddressAndPort()).getHeartBeatState().getHeartBeatVersion());
                final List<GossipDigest> gDigests = new ArrayList<>();

                Gossiper.instance.makeGossipDigest(gDigests);

                if (gDigests.size() > 0)
                {
                    GossipDigestSyn digestSynMessage = new GossipDigestSyn(getClusterName(),
                                                                           getPartitionerName(),
                                                                           ClusterMetadata.current().metadataIdentifier,
                                                                           gDigests);
                    Message<GossipDigestSyn> message = Message.out(GOSSIP_DIGEST_SYN, digestSynMessage);
                    /* Gossip to some random live member */
                    EnumSet<GossipedWith> gossipedWith = doGossipToLiveMember(message);

View on GitHub (pinned to 88fd0f6a0e)