{"record":{"id":"a67834ef6cc502e1","repo":"apache/cassandra","slug":"unknown-host-in-rpc-address","errorCode":null,"errorMessage":"Unknown host in rpc_address ","messagePattern":"Unknown host in rpc_address ","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1557,"sourceCode":"\n            if (broadcastAddress.isAnyLocalAddress())\n                throw new ConfigurationException(\"broadcast_address cannot be a wildcard address (\" + config.broadcast_address + \")!\", false);\n        }\n\n        /* Local IP, hostname or interface to bind RPC server to */\n        if (config.rpc_address != null && config.rpc_interface != null)\n        {\n            throw new ConfigurationException(\"Set rpc_address OR rpc_interface, not both\", false);\n        }\n        else if (config.rpc_address != null)\n        {\n            try\n            {\n                rpcAddress = InetAddress.getByName(config.rpc_address);\n            }\n            catch (UnknownHostException e)\n            {\n                throw new ConfigurationException(\"Unknown host in rpc_address \" + config.rpc_address, false);\n            }\n        }\n        else if (config.rpc_interface != null)\n        {\n            rpcAddress = getNetworkInterfaceAddress(config.rpc_interface, \"rpc_interface\", config.rpc_interface_prefer_ipv6);\n        }\n        else\n        {\n            rpcAddress = FBUtilities.getJustLocalAddress();\n        }\n\n        /* RPC address to broadcast */\n        if (config.broadcast_rpc_address != null)\n        {\n            try\n            {\n                broadcastRpcAddress = InetAddress.getByName(config.broadcast_rpc_address);\n            }","sourceCodeStart":1539,"sourceCodeEnd":1575,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1539-L1575","documentation":"The rpc_address value in cassandra.yaml could not be resolved to an IP address: InetAddress.getByName() threw UnknownHostException, which DatabaseDescriptor wraps into this ConfigurationException. The native transport server cannot determine its bind address, so startup aborts.","triggerScenarios":"config.rpc_address is non-null and InetAddress.getByName(config.rpc_address) throws UnknownHostException.","commonSituations":"Setting rpc_address to a hostname absent from /etc/hosts (default template uses hostname resolution); typos; containers started before network/DNS is ready; renamed hosts with stale DNS.","solutions":["Replace the hostname in rpc_address with the node's raw IP address.","Or fix host resolution (add the name to /etc/hosts / correct DNS).","Check the echoed value in the error message for typos."],"exampleFix":"# before (cassandra.yaml)\nrpc_address: cassandra-5\n# after\nrpc_address: 10.0.0.5","handlingStrategy":"validation","validationCode":"ra = yaml['rpc_address']\nraise \"rpc_address '#{ra}' unresolvable\" if ra && ra != '0.0.0.0' && !ra.match?(Resolv::IPv4::Regex) && !Resolv.getaddress(ra)","typeGuard":null,"tryCatchPattern":"catch (ConfigurationException e) { logger.error(\"rpc_address does not resolve: {}\", e.getMessage()); System.exit(2); }","preventionTips":["Use the node IP or 0.0.0.0 for rpc_address instead of hostnames","Ensure /etc/hosts has the node name when hostnames are required","Add a pre-start resolution check for all address settings"],"tags":["configuration","network","dns","rpc","cassandra"],"backgroundTag":"invalid-argument-value","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"}