{"record":{"id":"8b0e6969eb7d8bc0","repo":"apache/cassandra","slug":"set-rpc-address-or-rpc-interface-not-both","errorCode":null,"errorMessage":"Set rpc_address OR rpc_interface, not both","messagePattern":"Set rpc_address OR rpc_interface, not both","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1547,"sourceCode":"        if (config.broadcast_address != null)\n        {\n            try\n            {\n                broadcastAddress = InetAddress.getByName(config.broadcast_address);\n            }\n            catch (UnknownHostException e)\n            {\n                throw new ConfigurationException(\"Unknown broadcast_address '\" + config.broadcast_address + '\\'', false);\n            }\n\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        {","sourceCodeStart":1529,"sourceCodeEnd":1565,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1529-L1565","documentation":"DatabaseDescriptor.applyAddressConfig requires the client (native protocol RPC) server to bind via rpc_address OR rpc_interface. Having both set in cassandra.yaml is ambiguous, so startup fails with this ConfigurationException, mirroring the listen_address/listen_interface rule.","triggerScenarios":"cassandra.yaml contains non-null values for both rpc_address and rpc_interface.","commonSituations":"Uncommenting rpc_interface: eth0 while the default rpc_address: localhost is still active; automation tools that add rpc_interface without removing rpc_address.","solutions":["Keep only one of rpc_address or rpc_interface in cassandra.yaml; comment the other out.","Most deployments should set rpc_address to the node IP (or 0.0.0.0 to bind all interfaces) and leave rpc_interface commented.","Restart the node after fixing the config."],"exampleFix":"# before (cassandra.yaml)\nrpc_address: 0.0.0.0\nrpc_interface: eth0\n# after\nrpc_address: 0.0.0.0\n# rpc_interface: eth0","handlingStrategy":"validation","validationCode":"raise 'Set rpc_address OR rpc_interface, not both' if yaml['rpc_address'] && yaml['rpc_interface']","typeGuard":null,"tryCatchPattern":"catch (ConfigurationException e) { logger.error(\"cassandra.yaml rpc address conflict: {}\", e.getMessage()); System.exit(2); }","preventionTips":["When enabling rpc_interface, comment out rpc_address in the same change","Guard templated config generation with if/else, not concatenation","Lint cassandra.yaml before deployment"],"tags":["configuration","network","rpc","cassandra"],"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-14T16:17:12.679Z"}