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

  1. Use the node's IP address directly instead of a hostname
  2. Fix DNS or add the host to /etc/hosts on the coordinator node
  3. Verify the hostname spelling and that the address is reachable from the node executing the command
  4. 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

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


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)