{"record":{"id":"41cab2bb40d25e70","repo":"apache/cassandra","slug":"starting-gossip-by-operator-request","errorCode":null,"errorMessage":"Starting gossip by operator request","messagePattern":"Starting gossip by operator request","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":565,"sourceCode":"            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\");\n            Collection<Token> tokens = SystemKeyspace.getSavedTokens();\n\n            boolean validTokens = tokens != null && !tokens.isEmpty();\n\n            // shouldn't be called before these are set if we intend to join the ring/are in the process of doing so\n            if (!isStarting() || joinRing)\n                assert validTokens : \"Cannot start gossiping for a node intended to join without valid tokens\";\n\n            if (validTokens)\n            {\n                List<Pair<ApplicationState, VersionedValue>> states = new ArrayList<>();\n                states.add(Pair.create(ApplicationState.TOKENS, valueFactory.tokens(tokens)));\n                states.add(Pair.create(ApplicationState.STATUS_WITH_PORT, valueFactory.normal(tokens)));\n                states.add(Pair.create(ApplicationState.STATUS, valueFactory.normal(tokens)));\n                logger.info(\"Node {} jump to NORMAL\", getBroadcastAddressAndPort());\n                Gossiper.instance.addLocalApplicationStates(states);\n            }\n","sourceCodeStart":547,"sourceCodeEnd":583,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L547-L583","documentation":"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.","triggerScenarios":"startGossiping() invoked while !isGossipRunning(), after checkServiceAllowedToStart(\"gossip\") passes; the method then loads saved tokens and validates the node is not mid-join improperly.","commonSituations":"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.","solutions":["If intentional, nothing to fix; monitor 'nodetool status' until the node reports UP/NORMAL.","If the node is still bootstrapping, let bootstrap complete before enabling gossip, or use the documented join procedure.","Check logs for the IllegalStateException raised when gossip start is attempted from a disallowed state.","Ensure system.local/saved tokens are intact if token validation fails after this log."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"boolean canStart = !storageService.isGossipRunning()\n    && (storageService.isStarting() == false || joinRingAllowed);","typeGuard":null,"tryCatchPattern":"try { storageService.startGossiping(); } catch (IllegalStateException e) { log.warn(\"gossip start rejected\", e); }","preventionTips":["Only enable gossip after bootstrap/join state is confirmed.","Check 'nodetool status' before re-enabling gossip.","Keep saved tokens intact; do not wipe saved_caches/system keyspace casually."],"tags":["cassandra","gossip","operations","startup"],"backgroundTag":"invalid-state-transition","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}