{"record":{"id":"69264be9f19007f3","repo":"apache/cassandra","slug":"unable-to-parse-node-id-string","errorCode":null,"errorMessage":"Unable to parse node id string ","messagePattern":"Unable to parse node id string ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":1707,"sourceCode":"            default:\n                throw new RuntimeException(\"Can't abort bootstrap for node \" + nodeId + \" since the state is \" + nodeState);\n        }\n    }\n\n    private static NodeId parseNodeIdOrEndpoint(ClusterMetadata metadata, String nodeStr, String endpointStr)\n    {\n        NodeId nodeId;\n        if (!StringUtils.isEmpty(nodeStr))\n        {\n            try\n            {\n                nodeId = NodeId.fromString(nodeStr);\n            }\n            catch (IllegalArgumentException | UnsupportedOperationException e)\n            {\n                String msg = \"Unable to parse node id string \" + nodeStr;\n                logger.warn(\"{}\", msg, e);\n                throw new IllegalArgumentException(msg, e);\n            }\n        }\n        else\n        {\n            InetAddressAndPort endpoint;\n            try\n            {\n                endpoint = InetAddressAndPort.getByName(endpointStr);\n            }\n            catch (UnknownHostException e)\n            {\n                String msg = \"Unable to look up endpoint \" + endpointStr;\n                logger.warn(\"{}\", msg, e);\n                throw new IllegalArgumentException(msg, e);\n            }\n\n            nodeId = metadata.directory.peerId(endpoint);\n            if (nodeId == null)","sourceCodeStart":1689,"sourceCodeEnd":1725,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L1689-L1725","documentation":"Thrown by parseNodeIdOrEndpoint in StorageService when the abortbootstrap node string cannot be converted to a NodeId via NodeId.fromString - the string is neither a parseable node id nor was an endpoint string expected. The underlying parse exception is wrapped and logged at WARN before rethrowing as IllegalArgumentException.","triggerScenarios":"Calling `nodetool abortbootstrap <arg>` with a malformed node id (not a valid UUID/host-id format) while no endpoint string was supplied, e.g. a hostname passed where a host id is required.","commonSituations":"Passing a hostname or friendly name instead of the UUID host id; copy-paste truncating the UUID; using an IP in a mode expecting a node id string.","solutions":["Supply the node's full host id (UUID) as shown by `nodetool status`","Or pass the node's IP address so the endpoint branch of parseNodeIdOrEndpoint is used instead","Check for whitespace/truncation in the id string","Use `nodetool info` on the target node to read its exact host id"],"exampleFix":"// before\nnodetool abortbootstrap node1.example.com   # parsed as node id -> fails\n// after\nnodetool abortbootstrap 10.0.0.5\n# or\nnodetool abortbootstrap 8a1f...-full-host-id-uuid","handlingStrategy":"validation","validationCode":"// Validate the node id is a parseable UUID before passing it\njava.util.UUID.fromString(nodeStr); // throws if malformed","typeGuard":"boolean isValidNodeId(String s) {\n    try { java.util.UUID.fromString(s); return true; }\n    catch (IllegalArgumentException e) { return false; }\n}","tryCatchPattern":"try {\n    probe.abortBootstrap(nodeStr);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Unable to parse node id string\"))\n        log.warn(\"'{}' is not a host id; pass a UUID or the node's IP\", nodeStr);\n    else throw e;\n}","preventionTips":["Pass a full UUID host id or a bare IP address - not hostnames - to abortbootstrap","Beware shell quoting/truncation when copy-pasting UUIDs","Read the exact id from `nodetool status` or target node's `nodetool info`"],"tags":["nodetool","parsing","uuid","invalid-argument"],"backgroundTag":"invalid-argument-format","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}