apache/cassandra · critical · ConfigurationException
is in use by another process. Change…
Error message
<bind> is in use by another process. Change listen_address:storage_port in cassandra.yaml to values that do not conflict with other services
What it means
InboundConnectionInitiator.bind() wraps Netty bind failures. When the underlying channel failure message contains 'in use', it means the address:port Cassandra wants to listen on for internode messaging is already taken by another process, so a ConfigurationException with guidance to change listen_address/storage_port is thrown.
Solutions
- Find and stop the process holding the port (lsof -i :7000 or ss -ltnp | grep 7000), or kill the stale Cassandra instance
- Change storage_port (and ssl_storage_port if used) in cassandra.yaml to a free port
- Change listen_address to a different IP/interface if running multiple nodes on one host
- In containers/Kubernetes, fix duplicated hostPort or service port mappings
Example fix
// before (cassandra.yaml) storage_port: 7000 // after storage_port: 7011 # after verifying 7011 is free: ss -ltn | grep 7011
Defensive patterns
Strategy: validation
Validate before calling
#!/bin/bash if ss -ltn | grep -q ':7000 '; then echo "port 7000 already in use"; exit 1; fi
Try / catch
try { startCassandra(); } catch (ConfigurationException e) { if (e.getMessage().contains("in use by another process")) { /* free the port or change storage_port */ } } Prevention
- Check port availability before startup: ss -ltn | grep <storage_port>
- Use distinct storage_port values when running multiple nodes per host
- Ensure only one Cassandra instance runs per host (systemd/puppet exclusivity)
- Use listen_interface instead of hardcoded IPs to reduce config drift
When it happens
Trigger: Calling bind() for the messaging socket when another process already holds listen_address:storage_port (e.g. a second Cassandra node started on the same host, or another service on port 7000).
Common situations: Starting two Cassandra instances on one machine without changing storage_port; a leftover zombie Cassandra process still holding the port; a dev service (proxy, app server) occupying port 7000; container port mapping conflicts.
Related errors
- failed to bind to
- Unable to bind to address
- broadcast_address cannot be a wildcard address (
- Failed to bind port on .
- Invalid ip address from input=
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/f173e97f3d833e3c.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/net/InboundConnectionInitiator.java:199
bootstrap.childOption(ChannelOption.SO_RCVBUF, socketReceiveBufferSizeInBytes);
InetAddressAndPort bind = initializer.settings.bindAddress;
ChannelFuture channelFuture = bootstrap.bind(new InetSocketAddress(bind.getAddress(), bind.getPort()));
if (!channelFuture.awaitUninterruptibly().isSuccess())
{
if (channelFuture.channel().isOpen())
channelFuture.channel().close();
Throwable failedChannelCause = channelFuture.cause();
String causeString = "";
if (failedChannelCause != null && failedChannelCause.getMessage() != null)
causeString = failedChannelCause.getMessage();
if (causeString.contains("in use"))
{
throw new ConfigurationException(bind + " is in use by another process. Change listen_address:storage_port " +
"in cassandra.yaml to values that do not conflict with other services");
}
else if (causeString.contains("cannot assign requested address"))
{
throw new ConfigurationException("Unable to bind to address " + bind
+ ". Set listen_address in cassandra.yaml to an interface you can bind to, e.g., your private IP address on EC2");
}
else
{
throw new ConfigurationException("failed to bind to: " + bind, failedChannelCause);
}
}
return channelFuture;
}
public static ChannelFuture bind(InboundConnectionSettings settings, ChannelGroup channelGroup,
Consumer<ChannelPipeline> pipelineInjector)View on GitHub (pinned to 88fd0f6a0e)