apache/cassandra · error · RuntimeException

Could not assassinate an unresolvable endpoint

Error message

Could not assassinate an unresolvable endpoint

What it means

assassinateEndpoint requires the target address to resolve to an InetAddressAndPort; if DNS/hosts resolution of the supplied address fails (UnknownHostException), the node cannot construct the endpoint identity to remove from gossip, so RuntimeException 'Could not assassinate an unresolvable endpoint' is thrown and nothing is changed.

Source

Thrown at src/java/org/apache/cassandra/service/StorageService.java:3741

        NodeId toRemove = NodeId.fromString(hostIdString);
        SingleNodeSequences.removeNode(toRemove, force);
    }

    public void abortRemoveNode(String nodeId)
    {
        SingleNodeSequences.abortRemoveNode(nodeId);
    }

    public void assassinateEndpoint(String address)
    {
        try
        {
            InetAddressAndPort endpoint = InetAddressAndPort.getByName(address);
            Assassinate.assassinateEndpoint(endpoint);
        }
        catch (UnknownHostException e)
        {
            throw new RuntimeException("Could not assassinate an unresolvable endpoint");
        }
    }

    public void confirmReplication(InetAddressAndPort node)
    {
        // replicatingNodes can be empty in the case where this node used to be a removal coordinator,
        // but restarted before all 'replication finished' messages arrived. In that case, we'll
        // still go ahead and acknowledge it.
        if (!replicatingNodes.isEmpty())
        {
            replicatingNodes.remove(node);
        }
        else
        {
            logger.info("Received unexpected REPLICATION_FINISHED message from {}. Was this node recently a removal coordinator?", node);
        }
    }

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Use the literal IP:port form of the dead node (as shown by nodetool gossipinfo / netstats) instead of a hostname
  2. If a hostname is required, add it to /etc/hosts or DNS so it resolves
  3. Fix malformed address syntax and retry nodetool assassinate

Example fix

// before
nodetool assassinate dead-node.internal
// after
nodetool assassinate 10.0.0.42:7000   # literal endpoint from nodetool gossipinfo
Defensive patterns

Strategy: validation

Validate before calling

try {
    InetAddressAndPort.getByName(address);
} catch (UnknownHostException e) {
    throw new IllegalArgumentException("Endpoint does not resolve: " + address);
}

Try / catch

try { ss.assassinateEndpoint(address); } catch (RuntimeException e) { /* use literal IP:port from gossipinfo */ }

Prevention

When it happens

Trigger: Running `nodetool assassinate <address>` with a hostname that does not resolve, a malformed IP, or an address not present in DNS/hosts when cluster uses hostnames; using a placeholder from a stale ops document.

Common situations: Typo in IP (e.g., missing octet) or copying a hostname from another environment; DNS changes after decommission so the dead node's name no longer resolves; IPv6 string passed without proper formatting.

Understand the failure class

Background: "invalid id" errors: invalid identifier format — why libraries reject IDs before lookup, and how to fix them — this error's family across 37 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/4f5982d72f5ee899. Report an issue: GitHub.