apache/cassandra · warning
Could not discover CMS from
Error message
Could not discover CMS from
What it means
RemoteProcessor.tryDiscover attempts to discover the Cluster Metadata Service (CMS) by contacting remote nodes; when the discovery promise does not complete within DatabaseDescriptor.getCmsAwaitTimeout(), the timeout/exception is logged as a warning and an empty DiscoveredNodes with Kind.KNOWN_PEERS is returned so the caller (cms) can fall back to known peers. This is a degraded-discovery warning, not a fatal error.
Solutions
- Verify the CMS hosts are running and reachable (nodetool status, ping/check rpc_address and broadcast_address).
- Increase cms_await_timeout in cassandra.yaml (or the corresponding system property) to allow slower discovery.
- Confirm internode connectivity and TLS settings; check for firewall or wrong seed/address configuration.
- If this recurs at every startup, check the system.cluster_metadata logs on candidates to confirm which node actually hosts the CMS and re-run CMS relocation if needed.
Example fix
// cassandra.yaml // before cms_await_timeout: 10s // after cms_await_timeout: 60s
Defensive patterns
Strategy: retry
Validate before calling
// Before relying on discovery, check CMS reachability
if (!ClusterMetadataService.instance().isCurrent() && ClusterMetadataService.instance().isRunning()) {
// discovery should succeed; otherwise expect timeout fallback
} Try / catch
// Discovery degrades gracefully; handle the empty/KNOWN_PEERS result
DiscoveredNodes found = processor.tryDiscover(ep);
if (found.kind() == DiscoveredNodes.Kind.KNOWN_PEERS && found.nodes().isEmpty()) {
logger.warn("CMS discovery timed out; retrying after connectivity check");
} Prevention
- Keep cms_await_timeout generously sized for your network.
- Monitor CMS host health and ensure at least one candidate is always reachable.
- Validate broadcast/rpc address configuration before rolling out nodes.
When it happens
Trigger: Calling ClusterMetadataService.discover() (via RemoteProcessor.tryDiscover) when remote candidates do not respond before the cms_await_timeout elapses; network partition, firewall, or the target CMS host being down while the node is booting or re-registering with the cluster.
Common situations: Node joining a cluster whose CMS host is stopped or unreachable; misconfigured broadcast/rpc addresses so discovery RPCs go to the wrong IP; cms_await_timeout set too low for slow networks; starting a node while rest of cluster is still down.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
Related errors
- Configured " " could not be found
- Configured " " was found, but had no addresses
- Could not catchup with peers
- Could not fetch log entries from peer, remote =
- Failed to bind port on .
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/313f0ff7b14e24af.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tcm/RemoteProcessor.java:416
public void onResponse(Message<DiscoveredNodes> msg)
{
promise.setSuccess(msg.payload);
}
@Override
public void onFailure(InetAddressAndPort from, RequestFailure failureReason)
{
// "success" - this lets us just try the next one in cmsIter
promise.setSuccess(new DiscoveredNodes(Collections.emptySet(), DiscoveredNodes.Kind.KNOWN_PEERS));
}
});
try
{
return promise.get(DatabaseDescriptor.getCmsAwaitTimeout().to(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS);
}
catch (Exception e)
{
logger.warn("Could not discover CMS from " + ep, e);
}
return new DiscoveredNodes(Collections.emptySet(), DiscoveredNodes.Kind.KNOWN_PEERS);
}
public static class CandidateIterator extends AbstractIterator<InetAddressAndPort>
{
private final Deque<InetAddressAndPort> candidates;
private final Set<InetAddressAndPort> elements;
private final boolean checkLive;
@SuppressWarnings("resource")
public CandidateIterator(Collection<InetAddressAndPort> initialContacts)
{
this(initialContacts, true);
}
@SuppressWarnings("resource")
public CandidateIterator(Collection<InetAddressAndPort> initialContacts, boolean checkLive)View on GitHub (pinned to 88fd0f6a0e)