apache/cassandra · error · IllegalArgumentException
Unable to look up endpoint
Error message
Unable to look up endpoint
What it means
Thrown by parseNodeIdOrEndpoint in StorageService when the supplied endpoint string cannot be resolved to an IP address via InetAddressAndPort.getByName (UnknownHostException). The message wraps the original host resolution failure and is rethrown as IllegalArgumentException after logging at WARN.
Solutions
- Use the node's IP address directly instead of a hostname
- Fix DNS or add the host to /etc/hosts on the coordinator node
- Verify the hostname spelling and that the address is reachable from the node executing the command
- Include the port if the node uses a non-default storage port (format host:port as supported by InetAddressAndPort)
Example fix
// before nodetool abortbootstrap boot-node.internal # unresolvable // after nodetool abortbootstrap 10.0.0.5
Defensive patterns
Strategy: validation
Validate before calling
// Resolve the endpoint before calling java.net.InetAddress addr = java.net.InetAddress.getByName(endpointStr); String ip = addr.getHostAddress(); // use this for abortbootstrap
Try / catch
try {
probe.abortBootstrap(endpointStr);
} catch (IllegalArgumentException e) {
if (e.getMessage() != null && e.getMessage().startsWith("Unable to look up endpoint"))
log.warn("DNS cannot resolve {} - use the node IP or fix DNS/hosts", endpointStr);
else throw e;
} Prevention
- Prefer IP addresses over hostnames in nodetool operations
- Ensure DNS or /etc/hosts entries exist on the node running nodetool
- Verify address spelling and IPv6 literal formatting
When it happens
Trigger: Calling `nodetool abortbootstrap <endpoint>` with a hostname that DNS cannot resolve, a typo'd address, or an unresolvable name in an isolated network.
Common situations: DNS misconfiguration or missing /etc/hosts entry on the node running nodetool; using a hostname valid only inside the cluster network; IPv6 literal formatting issues; typo in the address.
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
- java.net.UnknownHostException
- Could not assassinate an unresolvable endpoint
- Replacement host name could not be resolved or scope_id was…
- Unable to obtain private address for node from cloud…
- Unable to obtain public address for node from cloud…
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/f695ea952e34b80e.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/StorageService.java:1721
catch (IllegalArgumentException | UnsupportedOperationException e)
{
String msg = "Unable to parse node id string " + nodeStr;
logger.warn("{}", msg, e);
throw new IllegalArgumentException(msg, e);
}
}
else
{
InetAddressAndPort endpoint;
try
{
endpoint = InetAddressAndPort.getByName(endpointStr);
}
catch (UnknownHostException e)
{
String msg = "Unable to look up endpoint " + endpointStr;
logger.warn("{}", msg, e);
throw new IllegalArgumentException(msg, e);
}
nodeId = metadata.directory.peerId(endpoint);
if (nodeId == null)
{
String msg = "Unknown endpoint: " + endpoint;
logger.warn(msg);
throw new IllegalArgumentException(msg);
}
}
return nodeId;
}
@Override
public void migrateConsensusProtocol(@Nonnull List<String> keyspaceNames,
@Nullable List<String> maybeTableNames,
@Nullable String maybeRangesStr)
{View on GitHub (pinned to 88fd0f6a0e)