{"record":{"id":"572e77a43cf18acd","repo":"apache/cassandra","slug":"could-not-resolve-any-streamcandidates-node-ids-to","errorCode":null,"errorMessage":"Could not resolve any streamCandidates node ids to endpoints: ","messagePattern":"Could not resolve any streamCandidates node ids to endpoints: ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tcm/sequences/ReconfigureCMS.java","lineNumber":430,"sourceCode":"        }\n\n        public static ActiveTransition withEndpoints(NodeId nodeId, Set<InetAddressAndPort> streamCandidateEndpoints)\n        {\n            return new ActiveTransition(nodeId, null, streamCandidateEndpoints);\n        }\n\n        public static ActiveTransition withNodeIds(NodeId nodeId, Set<NodeId> streamCandidates)\n        {\n            return new ActiveTransition(nodeId, streamCandidates, null);\n        }\n\n        public Set<InetAddressAndPort> streamCandidates(EndpointLookup epLookup)\n        {\n            if (streamCandidateEndpoints != null)\n                return streamCandidateEndpoints;\n            Set<InetAddressAndPort> candidates = streamCandidates.stream().map(epLookup::endpoint).filter(Objects::nonNull).collect(Collectors.toSet());\n            if (candidates.isEmpty())\n                throw new IllegalStateException(\"Could not resolve any streamCandidates node ids to endpoints: \" + streamCandidates);\n            if (candidates.size() != streamCandidates.size())\n                logger.warn(\"Could not resolve all streamCandidates to endpoints: {} {}\", candidates, streamCandidates);\n            return candidates;\n        }\n\n        @Override\n        public String toString()\n        {\n            return \"ActiveTransition{\" +\n                   \"nodeId=\" + nodeId +\n                   \", streamCandidateEndpoints=\" + streamCandidateEndpoints +\n                   \", streamCandidates=\" + streamCandidates +\n                   '}';\n        }\n\n        public static class Serializer implements MetadataSerializer<ActiveTransition>\n        {\n            @Override","sourceCodeStart":412,"sourceCodeEnd":448,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tcm/sequences/ReconfigureCMS.java#L412-L448","documentation":"Thrown by the serialized ReconfigureCMS step's streamCandidates(EndpointLookup) method when none of the persisted streamCandidates node ids can be resolved to an InetAddressAndPort via the endpoint lookup. Without endpoints, range streaming for the CMS reconfiguration cannot proceed. Partial resolution only logs a warning.","triggerScenarios":"Resolving a ReconfigureCMS step's persisted streamCandidates node ids against ClusterMetadata (or its lookup) where all ids map to null, e.g. nodes no longer present in cluster metadata.","commonSituations":"Metadata log replay after candidates were decommissioned mid-sequence; restoring a cluster from a backup with divergent membership; corrupted or pruned node-id to endpoint mappings.","solutions":["Restart / re-issue the CMS reconfiguration so a fresh streamCandidates set is persisted","Verify the candidate node ids exist in cluster metadata (system_clusters / directory) and repair membership state","Restore consistent cluster metadata (e.g. from the TCM log) so the endpoint lookup can resolve the ids","Avoid decommissioning nodes that are stream candidates while a CMS reconfiguration is in progress"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"boolean resolvable = step.streamCandidates.stream().allMatch(id -> epLookup.endpoint(id) != null);\nif (!resolvable) reissueReconfigureCMSWithFreshCandidates();","typeGuard":"Set<InetAddressAndPort> resolveOrEmpty(List<NodeId> ids, EndpointLookup l) {\n    return ids.stream().map(l::endpoint).filter(Objects::nonNull).collect(Collectors.toSet());\n}","tryCatchPattern":"try { candidates = step.streamCandidates(epLookup); }\ncatch (IllegalStateException e) { if (e.getMessage().contains(\"Could not resolve any streamCandidates\")) restartReconfigureCMS(); else throw e; }","preventionTips":["Never decommission nodes that are stream candidates of an in-flight CMS reconfiguration","Validate candidate node ids against current membership before resuming a sequence","Restore consistent TCM metadata before replaying interrupted reconfigurations"],"tags":["tcm","cms","streaming","endpoint-resolution"],"backgroundTag":"resource-not-found","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"}