{"record":{"id":"2b6b35dde18d6551","repo":"apache/cassandra","slug":"unable-to-stream-hints-since-no-live-endpoints-see","errorCode":null,"errorMessage":"Unable to stream hints since no live endpoints seen","messagePattern":"Unable to stream hints since no live endpoints seen","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":3624,"sourceCode":"        return SystemReplicas.getSystemReplicas(endpoints);\n    }\n    /**\n     * Find the best target to stream hints to. Currently the closest peer according to the snitch\n     */\n    private UUID getPreferredHintsStreamTarget()\n    {\n        ClusterMetadata metadata = ClusterMetadata.current();\n\n        Set<InetAddressAndPort> endpoints = metadata.directory.states.entrySet().stream()\n                                                                            .filter(e -> e.getValue() != NodeState.LEAVING)\n                                                                            .map(e -> metadata.directory.endpoint(e.getKey()))\n                                                                            .collect(toSet());\n\n        EndpointsForRange candidates = getStreamCandidates(endpoints);\n        if (candidates.isEmpty())\n        {\n            logger.warn(\"Unable to stream hints since no live endpoints seen\");\n            throw new RuntimeException(\"Unable to stream hints since no live endpoints seen\");\n        }\n        else\n        {\n            // stream to the closest peer as chosen by the configured proximity measures\n            candidates = DatabaseDescriptor.getNodeProximity().sortedByProximity(getBroadcastAddressAndPort(), candidates);\n            InetAddressAndPort hintsDestinationHost = candidates.get(0).endpoint();\n            return ClusterMetadata.current().directory.peerId(hintsDestinationHost).toUUID();\n        }\n    }\n\n    public void move(String newToken)\n    {\n        try\n        {\n            getTokenFactory().validate(newToken);\n        }\n        catch (ConfigurationException e)\n        {","sourceCodeStart":3606,"sourceCodeEnd":3642,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L3606-L3642","documentation":"When a node leaves the ring (e.g., decommission) it must hand off hinted handoff data to a live peer. If getStreamCandidates returns no live endpoints, there is nowhere to stream hints, so RuntimeException is thrown and the operation aborts rather than silently dropping hints.","triggerScenarios":"Calling nodetool decommission (or drain/leave paths that stream hints) on a single-node cluster or when every other node in the datacenter/ring is down — no live candidates exist to receive the hints.","commonSituations":"Decommissioning the last node of a cluster; decommissioning while all peers are failed; network partition isolating the node during leave; testing decommission on a one-node dev cluster.","solutions":["Ensure at least one peer node is UP before decommissioning (nodetool status)","On a single-node cluster, hints need no streaming — stop the node normally instead of decommissioning","Restart failed peers or fix network connectivity, then retry decommission"],"exampleFix":"// before\nnodetool decommission   # on a 1-node cluster\n// after\nnodetool drain && systemctl stop cassandra   # single node: just stop it","handlingStrategy":"validation","validationCode":"if (livePeerCount() == 0)\n    throw new IllegalStateException(\"No live peers; cannot stream hints during decommission\");","typeGuard":null,"tryCatchPattern":"try { ss.decommission(); } catch (RuntimeException e) { /* check nodetool status; bring peers up and retry */ }","preventionTips":["Always check nodetool status shows live peers before decommission","Never decommission the last node of a cluster — stop it instead","Avoid decommissioning during known network partitions"],"tags":["cassandra","hints","decommission","no-live-nodes"],"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-17T15:17:12.973Z"}