{"record":{"id":"d32892a098420e2a","repo":"apache/cassandra","slug":"no-node-present-with-ip-address-ip-in-given-clu","errorCode":null,"errorMessage":"No node present with ip address ${ip} in given cluster metadata.","messagePattern":"No node present with ip address (.+?) in given cluster metadata\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/tools/CMSOfflineTool.java","lineNumber":581,"sourceCode":"        {\n            if (id != null)\n            {\n                NodeId nodeId = NodeId.fromString(id);\n                if (!metadata.directory.peerIds().contains(nodeId))\n                {\n                    throw new IllegalArgumentException(\"No node present with id \" + id +\n                                                       \" in the given cluster metadata.\");\n                }\n                return nodeId;\n            }\n            else if (ip != null)\n            {\n                InetAddressAndPort nodeAddress = InetAddressAndPort.getByNameUnchecked(ip);\n                NodeId nodeId = metadata.directory.peerId(nodeAddress);\n\n                if (null == nodeId)\n                {\n                    throw new IllegalArgumentException(\"No node present with ip address \" + ip +\n                                                       \" in given cluster metadata.\");\n                }\n                return nodeId;\n            }\n\n            throw new IllegalArgumentException(\"Neither node id nor ip address specified to fetch NodeId from metadata.\");\n        }\n    }\n\n\n    /**\n     * Prints a high-level summary of the CMS state: members, epoch, replication factor,\n     * service state, and whether reconfiguration is needed.\n     */\n    @Command(name = \"describe\", description = \"Describes the cluster metadata.\")\n    static class Describe extends ClusterMetadataToolCmd\n    {\n        @Override","sourceCodeStart":563,"sourceCodeEnd":599,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/tools/CMSOfflineTool.java#L563-L599","documentation":"Thrown by CMSOfflineTool.getNodeId when an IP address is supplied but metadata.directory.peerId(nodeAddress) returns null, i.e. the address is not a known peer in the offline cluster metadata. It guards address-based node resolution before any mutation of the metadata.","triggerScenarios":"Passing --ip with an address that is not registered as a peer in the parsed ClusterMetadata: wrong IP/port (InetAddressAndPort includes the port), node not yet a peer at snapshot time, or decommissioned node.","commonSituations":"Node IP changed after the metadata was captured; port mismatch (tool expects the exact storage port of the peer, e.g. 7000 vs 7001 for TLS); querying a metadata snapshot from a different cluster.","solutions":["Use the exact host:port pair the node registers under, including the storage port.","Inspect metadata.directory.peerIds()/addresses to confirm the peer exists in this snapshot.","Fall back to the node's NodeId if the IP is uncertain.","Re-capture the cluster metadata if the node joined after the snapshot was taken."],"exampleFix":"// before\n// cms offline --ip 10.0.0.5        (no port)\n// after\n// cms offline --ip 10.0.0.5:7000   (exact peer address:port)","handlingStrategy":"validation","validationCode":"InetAddressAndPort addr = InetAddressAndPort.getByNameUnchecked(ip);\nif (metadata.directory.peerId(addr) == null)\n    throw new IllegalArgumentException(\"Address \" + ip + \" is not a peer in this metadata\");","typeGuard":null,"tryCatchPattern":"try { NodeId id = tool.getNodeId(opts); ... } catch (IllegalArgumentException e) { logger.error(\"Peer lookup failed: \" + e.getMessage()); }","preventionTips":["Include the storage port in the address","Verify peers exist in the snapshot before running mutations","Prefer node ids over IPs when in doubt"],"tags":["cli","cluster-metadata","ip-address","peer-not-found"],"backgroundTag":"entity-not-found","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"}