{"record":{"id":"c9220a6891f01996","repo":"apache/cassandra","slug":"unknown-endpoint-c9220a","errorCode":null,"errorMessage":"Unknown endpoint ","messagePattern":"Unknown endpoint ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":1826,"sourceCode":"        }\n        return map;\n    }\n\n    /**\n     * Return the native address associated with an endpoint as a string.\n     * @param endpoint The endpoint to get rpc address for\n     * @return the native address\n     */\n    public String getNativeaddress(InetAddressAndPort endpoint, boolean withPort)\n    {\n        if (endpoint.equals(getBroadcastAddressAndPort()))\n            return FBUtilities.getBroadcastNativeAddressAndPort().getHostAddress(withPort);\n\n        ClusterMetadata metadata = ClusterMetadata.current();\n        Directory directory = metadata.directory;\n        NodeId id = directory.peerId(endpoint);\n        if (id == null)\n            throw new RuntimeException(\"Unknown endpoint \" + endpoint);\n\n        NodeAddresses addresses = directory.getNodeAddresses(id);\n        return addresses.nativeAddress.getHostAddress(withPort);\n    }\n\n    public Map<List<String>, List<String>> getRangeToRpcaddressMap(String keyspace)\n    {\n        return getRangeToNativeaddressMap(keyspace, false);\n    }\n\n    public Map<List<String>, List<String>> getRangeToNativeaddressWithPortMap(String keyspace)\n    {\n        return getRangeToNativeaddressMap(keyspace, true);\n    }\n\n    /**\n     * for a keyspace, return the ranges and corresponding RPC addresses for a given keyspace.\n     * @param keyspace","sourceCodeStart":1808,"sourceCodeEnd":1844,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L1808-L1844","documentation":"Thrown by StorageService.getNativeAddress (used for rpc address lookups) when the given endpoint has no NodeId in cluster metadata's directory - the endpoint is not a known peer. Thrown as RuntimeException since it typically comes from internal address mapping rather than direct user input.","triggerScenarios":"Querying the native (rpc) address for an endpoint via JMX/StorageService that is not in cluster metadata; stale client or tooling caches referencing removed nodes; lookup during topology changes before metadata converges.","commonSituations":"Monitoring scripts using an old node address after decommission/removenode; race between node removal and metadata propagation; misconfigured tooling pointing at a load balancer or VIP instead of a real node.","solutions":["Use an endpoint that is a current cluster member (see `nodetool status`)","Refresh tooling/monitoring configuration to drop removed node addresses","If a node was just removed, wait for cluster metadata convergence and retry","For rpc address of arbitrary hosts, configure broadcast/rpc_address correctly on the nodes instead of resolving unknown endpoints"],"exampleFix":"// before\n// lookup nativeAddress for 10.0.0.9 (removed node)\n// after\n// read current members from nodetool status and look up only those endpoints","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    String nativeAddr = ssProxy.getNativeAddress(endpoint);\n} catch (RuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Unknown endpoint\"))\n        log.warn(\"Endpoint {} is not a current cluster member; refresh member list\", endpoint);\n    else throw e;\n}","preventionTips":["Keep monitoring/tooling member lists in sync with `nodetool status`","Don't cache node addresses across decommission/removenode operations","Point tools at real node addresses, not VIPs/load balancers"],"tags":["jmx","rpc-address","cluster-metadata","topology"],"backgroundTag":"resource-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"}