apache/cassandra · error · IllegalStateException
Could not resolve any streamCandidates node ids to endpoints
Error message
Could not resolve any streamCandidates node ids to endpoints:
What it means
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.
Source
Thrown at src/java/org/apache/cassandra/tcm/sequences/ReconfigureCMS.java:430
}
public static ActiveTransition withEndpoints(NodeId nodeId, Set<InetAddressAndPort> streamCandidateEndpoints)
{
return new ActiveTransition(nodeId, null, streamCandidateEndpoints);
}
public static ActiveTransition withNodeIds(NodeId nodeId, Set<NodeId> streamCandidates)
{
return new ActiveTransition(nodeId, streamCandidates, null);
}
public Set<InetAddressAndPort> streamCandidates(EndpointLookup epLookup)
{
if (streamCandidateEndpoints != null)
return streamCandidateEndpoints;
Set<InetAddressAndPort> candidates = streamCandidates.stream().map(epLookup::endpoint).filter(Objects::nonNull).collect(Collectors.toSet());
if (candidates.isEmpty())
throw new IllegalStateException("Could not resolve any streamCandidates node ids to endpoints: " + streamCandidates);
if (candidates.size() != streamCandidates.size())
logger.warn("Could not resolve all streamCandidates to endpoints: {} {}", candidates, streamCandidates);
return candidates;
}
@Override
public String toString()
{
return "ActiveTransition{" +
"nodeId=" + nodeId +
", streamCandidateEndpoints=" + streamCandidateEndpoints +
", streamCandidates=" + streamCandidates +
'}';
}
public static class Serializer implements MetadataSerializer<ActiveTransition>
{
@OverrideView on GitHub (pinned to 88fd0f6a0e)
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
Defensive patterns
Strategy: validation
Validate before calling
boolean resolvable = step.streamCandidates.stream().allMatch(id -> epLookup.endpoint(id) != null); if (!resolvable) reissueReconfigureCMSWithFreshCandidates();
Type guard
Set<InetAddressAndPort> resolveOrEmpty(List<NodeId> ids, EndpointLookup l) {
return ids.stream().map(l::endpoint).filter(Objects::nonNull).collect(Collectors.toSet());
} Try / catch
try { candidates = step.streamCandidates(epLookup); }
catch (IllegalStateException e) { if (e.getMessage().contains("Could not resolve any streamCandidates")) restartReconfigureCMS(); else throw e; } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Unknown endpoint %s
- Node %s is not a CMS member in epoch %s; members=%s
- %s is already joining the CMS
- %s has already fully joined the CMS
- %s is not currently joining the CMS
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/572e77a43cf18acd.
Report an issue: GitHub.