{"record":{"id":"4f5982d72f5ee899","repo":"apache/cassandra","slug":"could-not-assassinate-an-unresolvable-endpoint","errorCode":null,"errorMessage":"Could not assassinate an unresolvable endpoint","messagePattern":"Could not assassinate an unresolvable endpoint","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":3741,"sourceCode":"        NodeId toRemove = NodeId.fromString(hostIdString);\n        SingleNodeSequences.removeNode(toRemove, force);\n    }\n\n    public void abortRemoveNode(String nodeId)\n    {\n        SingleNodeSequences.abortRemoveNode(nodeId);\n    }\n\n    public void assassinateEndpoint(String address)\n    {\n        try\n        {\n            InetAddressAndPort endpoint = InetAddressAndPort.getByName(address);\n            Assassinate.assassinateEndpoint(endpoint);\n        }\n        catch (UnknownHostException e)\n        {\n            throw new RuntimeException(\"Could not assassinate an unresolvable endpoint\");\n        }\n    }\n\n    public void confirmReplication(InetAddressAndPort node)\n    {\n        // replicatingNodes can be empty in the case where this node used to be a removal coordinator,\n        // but restarted before all 'replication finished' messages arrived. In that case, we'll\n        // still go ahead and acknowledge it.\n        if (!replicatingNodes.isEmpty())\n        {\n            replicatingNodes.remove(node);\n        }\n        else\n        {\n            logger.info(\"Received unexpected REPLICATION_FINISHED message from {}. Was this node recently a removal coordinator?\", node);\n        }\n    }\n","sourceCodeStart":3723,"sourceCodeEnd":3759,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L3723-L3759","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use the literal IP:port form of the dead node (as shown by nodetool gossipinfo / netstats) instead of a hostname","If a hostname is required, add it to /etc/hosts or DNS so it resolves","Fix malformed address syntax and retry nodetool assassinate"],"exampleFix":"// before\nnodetool assassinate dead-node.internal\n// after\nnodetool assassinate 10.0.0.42:7000   # literal endpoint from nodetool gossipinfo","handlingStrategy":"validation","validationCode":"try {\n    InetAddressAndPort.getByName(address);\n} catch (UnknownHostException e) {\n    throw new IllegalArgumentException(\"Endpoint does not resolve: \" + address);\n}","typeGuard":null,"tryCatchPattern":"try { ss.assassinateEndpoint(address); } catch (RuntimeException e) { /* use literal IP:port from gossipinfo */ }","preventionTips":["Always assassinate by literal IP:port copied from nodetool gossipinfo","Avoid hostnames for dead nodes (DNS may no longer resolve them)","Sanity-check the address format before running assassinate"],"tags":["cassandra","nodetool","dns","assassinate"],"backgroundTag":"invalid-identifier-format","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}