apache/cassandra · critical · ConfigurationException
Set rpc_address OR rpc_interface, not both
Error message
Set rpc_address OR rpc_interface, not both
What it means
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.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:1547
if (config.broadcast_address != null)
{
try
{
broadcastAddress = InetAddress.getByName(config.broadcast_address);
}
catch (UnknownHostException e)
{
throw new ConfigurationException("Unknown broadcast_address '" + config.broadcast_address + '\'', false);
}
if (broadcastAddress.isAnyLocalAddress())
throw new ConfigurationException("broadcast_address cannot be a wildcard address (" + config.broadcast_address + ")!", false);
}
/* Local IP, hostname or interface to bind RPC server to */
if (config.rpc_address != null && config.rpc_interface != null)
{
throw new ConfigurationException("Set rpc_address OR rpc_interface, not both", false);
}
else if (config.rpc_address != null)
{
try
{
rpcAddress = InetAddress.getByName(config.rpc_address);
}
catch (UnknownHostException e)
{
throw new ConfigurationException("Unknown host in rpc_address " + config.rpc_address, false);
}
}
else if (config.rpc_interface != null)
{
rpcAddress = getNetworkInterfaceAddress(config.rpc_interface, "rpc_interface", config.rpc_interface_prefer_ipv6);
}
else
{View on GitHub (pinned to 88fd0f6a0e)
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.
Example fix
# before (cassandra.yaml) rpc_address: 0.0.0.0 rpc_interface: eth0 # after rpc_address: 0.0.0.0 # rpc_interface: eth0
Defensive patterns
Strategy: validation
Validate before calling
raise 'Set rpc_address OR rpc_interface, not both' if yaml['rpc_address'] && yaml['rpc_interface']
Try / catch
catch (ConfigurationException e) { logger.error("cassandra.yaml rpc address conflict: {}", e.getMessage()); System.exit(2); } Prevention
- 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
When it happens
Trigger: cassandra.yaml contains non-null values for both rpc_address and rpc_interface.
Common situations: Uncommenting rpc_interface: eth0 while the default rpc_address: localhost is still active; automation tools that add rpc_interface without removing rpc_address.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- Unknown host in rpc_address
- Set listen_address OR listen_interface, not both
- Unknown listen_address '
- listen_address cannot be a wildcard address (
- Unknown broadcast_address '
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/8b0e6969eb7d8bc0.
Report an issue: GitHub.