{"record":{"id":"e8b25b0f5f775695","repo":"apache/cassandra","slug":"if-rpc-address-is-set-to-a-wildcard-address","errorCode":null,"errorMessage":"If rpc_address is set to a wildcard address (","messagePattern":"If rpc_address is set to a wildcard address \\(","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1587,"sourceCode":"        /* RPC address to broadcast */\n        if (config.broadcast_rpc_address != null)\n        {\n            try\n            {\n                broadcastRpcAddress = InetAddress.getByName(config.broadcast_rpc_address);\n            }\n            catch (UnknownHostException e)\n            {\n                throw new ConfigurationException(\"Unknown broadcast_rpc_address '\" + config.broadcast_rpc_address + '\\'', false);\n            }\n\n            if (broadcastRpcAddress.isAnyLocalAddress())\n                throw new ConfigurationException(\"broadcast_rpc_address cannot be a wildcard address (\" + config.broadcast_rpc_address + \")!\", false);\n        }\n        else\n        {\n            if (rpcAddress.isAnyLocalAddress())\n                throw new ConfigurationException(\"If rpc_address is set to a wildcard address (\" + config.rpc_address + \"), then \" +\n                                                 \"you must set broadcast_rpc_address to a value other than \" + config.rpc_address, false);\n        }\n    }\n\n    public static void applyEncryptionContext()\n    {\n        // always attempt to load the cipher factory, as we could be in the situation where the user has disabled encryption,\n        // but has existing commitlogs and sstables on disk that are still encrypted (and still need to be read)\n        encryptionContext = new EncryptionContext(conf.transparent_data_encryption_options);\n    }\n\n    public static void applySslContext()\n    {\n        if (TEST_JVM_DTEST_DISABLE_SSL.getBoolean())\n            return;\n\n        try\n        {","sourceCodeStart":1569,"sourceCodeEnd":1605,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1569-L1605","documentation":"When broadcast_rpc_address is not set and rpc_address is the wildcard 0.0.0.0, Cassandra cannot compute a client-facing RPC address, so applyAddressConfig throws this ConfigurationException at startup. A wildcard rpc_address is only valid when an explicit non-wildcard broadcast_rpc_address advertises the node to clients.","triggerScenarios":"cassandra.yaml contains rpc_address: 0.0.0.0 (the default example) with no broadcast_rpc_address defined; DatabaseDescriptor.loadConfig() runs during startup.","commonSituations":"Fresh installs where operators set rpc_address to 0.0.0.0 to listen on all interfaces but forget the companion broadcast_rpc_address; config generators templating bind addresses only.","solutions":["Add a broadcast_rpc_address set to this node's routable IP/hostname","Or set rpc_address to the specific interface IP instead of 0.0.0.0","Keep rpc_address: 0.0.0.0 only when every node also has an explicit non-wildcard broadcast_rpc_address"],"exampleFix":"// cassandra.yaml before\nrpc_address: 0.0.0.0\n// after\nrpc_address: 0.0.0.0\nbroadcast_rpc_address: 10.0.1.5","handlingStrategy":"validation","validationCode":"String rpc = config.rpc_address;\nif ((rpc == null || \"0.0.0.0\".equals(rpc) || \"::\".equals(rpc)) && config.broadcast_rpc_address == null) {\n    throw new IllegalStateException(\"rpc_address is wildcard; broadcast_rpc_address must be set\");\n}","typeGuard":null,"tryCatchPattern":"try { DatabaseDescriptor.daemonInitialization(); } catch (ConfigurationException e) { /* correct cassandra.yaml */ }","preventionTips":["Rule: wildcard rpc_address implies mandatory broadcast_rpc_address","Default per-node configs to explicit interface IPs","Add this check to config-validation CI for cassandra.yaml"],"tags":["cassandra","configuration","wildcard-address"],"backgroundTag":"conflicting-config-options","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}