{"record":{"id":"dbc0a4c0add1e42b","repo":"apache/cassandra","slug":"stopping-gossip-by-operator-request","errorCode":null,"errorMessage":"Stopping gossip by operator request","messagePattern":"Stopping gossip by operator request","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":547,"sourceCode":"    public void register(IEndpointLifecycleSubscriber subscriber)\n    {\n        lifecycleSubscribers.add(subscriber);\n    }\n\n    public void unregister(IEndpointLifecycleSubscriber subscriber)\n    {\n        lifecycleSubscribers.remove(subscriber);\n    }\n\n    // should only be called via JMX\n    public void stopGossiping()\n    {\n        if (isGossipRunning())\n        {\n            if (!isNormal() && joinRing)\n                throw new IllegalStateException(\"Unable to stop gossip because the node is not in the normal state. Try to stop the node instead.\");\n\n            logger.warn(\"Stopping gossip by operator request\");\n\n            if (isNativeTransportRunning())\n            {\n                logger.warn(\"Disabling gossip while native transport is still active is unsafe\");\n            }\n\n            Gossiper.instance.stop();\n        }\n    }\n\n    // should only be called via JMX\n    public synchronized void startGossiping()\n    {\n        if (!isGossipRunning())\n        {\n            checkServiceAllowedToStart(\"gossip\");\n\n            logger.warn(\"Starting gossip by operator request\");","sourceCodeStart":529,"sourceCodeEnd":565,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L529-L565","documentation":"This is a WARN log emitted by StorageService.stopGossiping() when an operator explicitly disables gossip on a running node (typically via JMX/nodetool 'disablegossip'). It is informational: the node stops participating in cluster membership changes. Before stopping, the method refuses to proceed with IllegalStateException if the node is not yet in NORMAL status, and warns if native transport is still serving clients, since disabling gossip while serving traffic can cause consistency and routing problems.","triggerScenarios":"Operator invokes stopGossiping() (e.g. nodetool disablegossip or JMX stopTransports path) while isGossipRunning() is true and the node has passed the not-normal/joinRing guard.","commonSituations":"Ops debugging sessions where gossip is suspected of misbehaving; maintenance runbooks that disable gossip temporarily; accidental disablegossip invocations leaving a node silent in the cluster while client traffic continues.","solutions":["If the disable was intentional, no action needed; re-enable with nodetool enablegossip when done.","If accidental, immediately run 'nodetool enablegossip' to rejoin gossip.","Before disabling gossip, stop native transport first ('nodetool disablebinary') to avoid serving traffic while isolated.","Verify the node is in NORMAL state first; if not, use 'nodetool stop' / full node shutdown instead."],"exampleFix":"// before\nnodetool disablegossip  # while node serves clients\n// after\nnodetool disablebinary\nnodetool disablegossip\n# ... maintenance ...\nnodetool enablegossip\nnodetool enablebinary","handlingStrategy":"validation","validationCode":"boolean safeToStopGossip = storageService.isGossipRunning()\n    && storageService.isNativeTransportRunning() == false; // stop binary first if true","typeGuard":null,"tryCatchPattern":"try { storageService.stopGossiping(); } catch (IllegalStateException e) { /* node not NORMAL; stop the node instead */ }","preventionTips":["Stop native transport before disabling gossip.","Verify node status is NORMAL before toggling gossip.","Wrap gossip toggles in maintenance runbooks, not ad-hoc JMX calls."],"tags":["cassandra","gossip","operations","warning-log"],"backgroundTag":"unsupported-state-transition","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}