{"record":{"id":"51a21ac3b1d8c35d","repo":"apache/cassandra","slug":"no-local-state-state-is-in-silent-shutdown-or-no","errorCode":null,"errorMessage":"No local state, state is in silent shutdown, or node hasn't joined, not announcing shutdown","messagePattern":"No local state, state is in silent shutdown, or node hasn't joined, not announcing shutdown","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/java/org/apache/cassandra/gms/Gossiper.java","lineNumber":1944,"sourceCode":"    public void stop()\n    {\n        EndpointState mystate = endpointStateMap.get(getBroadcastAddressAndPort());\n        if (mystate != null && !isSilentShutdownState(mystate) && StorageService.instance.isJoined())\n        {\n            logger.info(\"Announcing shutdown\");\n            shutdownAnnounced.set(true);\n\n            addLocalApplicationState(ApplicationState.STATUS_WITH_PORT, StorageService.instance.valueFactory.shutdown(true));\n            addLocalApplicationState(ApplicationState.STATUS, StorageService.instance.valueFactory.shutdown(true));\n            // clone endpointstate to avoid it changing between serializedSize and serialize calls\n            EndpointState clone = new EndpointState(mystate);\n            Message<GossipShutdown> message = Message.out(Verb.GOSSIP_SHUTDOWN, new GossipShutdown(clone));\n            for (InetAddressAndPort ep : liveEndpoints)\n                MessagingService.instance().send(message, ep);\n            Uninterruptibles.sleepUninterruptibly(SHUTDOWN_ANNOUNCE_DELAY_IN_MS.getInt(), TimeUnit.MILLISECONDS);\n        }\n        else\n            logger.warn(\"No local state, state is in silent shutdown, or node hasn't joined, not announcing shutdown\");\n        if (scheduledGossipTask != null)\n            scheduledGossipTask.cancel(false);\n    }\n\n    public boolean isEnabled()\n    {\n        ScheduledFuture<?> scheduledGossipTask = this.scheduledGossipTask;\n        return (scheduledGossipTask != null) && (!scheduledGossipTask.isCancelled());\n    }\n\n    @VisibleForTesting\n    public void initializeNodeUnsafe(InetAddressAndPort addr, UUID uuid, int generationNbr)\n    {\n        initializeNodeUnsafe(addr, uuid, MessagingService.current_version, generationNbr);\n    }\n\n    @VisibleForTesting\n    public void initializeNodeUnsafe(InetAddressAndPort addr, UUID uuid, int netVersion, int generationNbr)","sourceCodeStart":1926,"sourceCodeEnd":1962,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/gms/Gossiper.java#L1926-L1962","documentation":"During coordinated shutdown, Gossiper announces GOSSIP_SHUTDOWN to live peers only if the local node has valid endpoint state and has fully joined. If the local state is absent, already in silent shutdown, or the node never joined the ring, it warns that no shutdown announcement is sent and cancels the gossip task.","triggerScenarios":"Calling Gossiper.sendShutdown (via stopGossiping/drain) when the node's own endpoint state is null, isSilentShutdownState is true, or StorageService operation mode indicates the node never completed joining.","commonSituations":"Stopping a node that failed during bootstrap/Join; double drain or repeated shutdown scripts; node started but never joined the ring being stopped again; state corruption after crash mid-join.","solutions":["Confirm the node actually joined (nodetool status/statusbinary) before expecting a clean shutdown announcement.","If shutting down a never-joined node, treat this as expected; the warning is harmless.","Avoid repeated drain/stop calls; check shutdown scripts for idempotency.","If state is stuck, wipe gossip state (data/system folder only per recovery docs) and re-bootstrap a fresh node."],"exampleFix":"// before: draining a node that never joined\nnodetool drain   # warns, not fully joined\n// after: verify join state first\nnodetool status  # ensure node is UN before drain/decommission","handlingStrategy":"validation","validationCode":"if (StorageService.instance.getOperationMode().equals(\"NORMAL\") && Gossiper.instance.getEndpointStateForEndpoint(FBUtilities.getBroadcastAddressAndPort()) != null) { gossiper.sendShutdown(); }","typeGuard":"boolean joined = \"NORMAL\".equals(StorageService.instance.getOperationMode());","tryCatchPattern":null,"preventionTips":["Only expect shutdown announcements from joined nodes; make shutdown scripts idempotent.","Check operation mode (nodetool status or logs) before drain.","Investigate repeated 'hasn't joined' warnings — they hint at failed bootstrap."],"tags":["cassandra","gossip","shutdown","node-lifecycle"],"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"}