apache/cassandra · error · IllegalStateException
Can't ignore local host %s when doing CMS migration
Error message
Can't ignore local host %s when doing CMS migration
What it means
upgradeFromGossip() migrates cluster management from gossip to TCM/CMS. The caller supplies a set of endpoints to ignore during the migration, but the local node itself must participate; if the local broadcast address appears in the ignored set, an IllegalStateException is thrown since the migrating node cannot exclude itself.
Source
Thrown at src/java/org/apache/cassandra/tcm/ClusterMetadataService.java:431
}
// otherwise, this is a noop.
return preInit -> {
};
}
public boolean isCurrentMember(InetAddressAndPort peer)
{
return ClusterMetadata.current().isCMSMember(peer);
}
public void upgradeFromGossip(List<String> ignoredEndpoints)
{
Set<InetAddressAndPort> ignored = ignoredEndpoints.stream().map(InetAddressAndPort::getByNameUnchecked).collect(toSet());
if (ignored.contains(FBUtilities.getBroadcastAddressAndPort()))
{
String msg = String.format("Can't ignore local host %s when doing CMS migration", FBUtilities.getBroadcastAddressAndPort());
logger.error(msg);
throw new IllegalStateException(msg);
}
ClusterMetadata metadata = metadata();
if (metadata.myNodeState() != NodeState.JOINED)
{
String msg = String.format("Initial CMS node needs to be fully joined, not: %s", metadata.myNodeState());
logger.error(msg);
throw new IllegalStateException(msg);
}
Set<InetAddressAndPort> existingMembers = metadata.fullCMSMembers();
if (!metadata.directory.allAddresses().containsAll(ignored))
{
Set<InetAddressAndPort> allAddresses = Sets.newHashSet(metadata.directory.allAddresses());
String msg = String.format("Ignored host(s) %s don't exist in the cluster", Sets.difference(ignored, allAddresses));
logger.error(msg);
throw new IllegalStateException(msg);View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Remove the local node's broadcast address from the ignored endpoints set and retry the migration.
- Verify resolved addresses (getByNameUnchecked may expand hostnames) do not include the local IP/port.
- Only ignore endpoints that are genuinely being decommissioned/removed, never the local node.
Example fix
// before
Set<InetAddressAndPort> ignored = endpoints.stream().map(InetAddressAndPort::getByNameUnchecked).collect(toSet());
cms.upgradeFromGossip(ignored); // includes local node
// after
Set<InetAddressAndPort> ignored = endpoints.stream().map(InetAddressAndPort::getByNameUnchecked)
.filter(a -> !a.equals(FBUtilities.getBroadcastAddressAndPort()))
.collect(toSet());
cms.upgradeFromGossip(ignored); Defensive patterns
Strategy: validation
Validate before calling
Set<InetAddressAndPort> resolved = ignoredEndpoints.stream()
.map(InetAddressAndPort::getByNameUnchecked).collect(toSet());
if (resolved.contains(FBUtilities.getBroadcastAddressAndPort()))
throw new IllegalArgumentException("Cannot ignore local node during CMS migration"); Try / catch
try {
cms.upgradeFromGossip(ignoredEndpoints);
} catch (IllegalStateException e) {
logger.error("Fix ignore list: {}", e.getMessage());
} Prevention
- Never include the local node's address in ignore lists
- Resolve hostnames to addresses and diff against the local broadcast address before invoking
- Audit decommission scripts for copy-pasted ignore lists
When it happens
Trigger: Calling ClusterMetadataService.upgradeFromGossip(ignoredEndpoints) where the set (after InetAddressAndPort resolution) contains FBUtilities.getBroadcastAddressAndPort().
Common situations: Operator error in nodetool/admin invocation listing the local node's IP among endpoints to ignore (e.g. decommissioning lists, copy-pasted ignore lists), or DNS/hostname resolution unexpectedly matching the local address.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Unknown host in epState for
- Versions differ: {} != {}
- Load CIDR groups cache operation not supported by %s
- Unsupported parameter '%s' for %s, supported parameters are
- JAAS login configuration missing for JMX authenticator setup
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/45ce548ede908e35.
Report an issue: GitHub.