{"record":{"id":"f173e97f3d833e3c","repo":"apache/cassandra","slug":"bind-is-in-use-by-another-process-change-liste","errorCode":null,"errorMessage":"<bind> is in use by another process.  Change listen_address:storage_port in cassandra.yaml to values that do not conflict with other services","messagePattern":"<bind> is in use by another process\\.  Change listen_address:storage_port in cassandra\\.yaml to values that do not conflict with other services","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/net/InboundConnectionInitiator.java","lineNumber":199,"sourceCode":"            bootstrap.childOption(ChannelOption.SO_RCVBUF, socketReceiveBufferSizeInBytes);\n\n        InetAddressAndPort bind = initializer.settings.bindAddress;\n        ChannelFuture channelFuture = bootstrap.bind(new InetSocketAddress(bind.getAddress(), bind.getPort()));\n\n        if (!channelFuture.awaitUninterruptibly().isSuccess())\n        {\n            if (channelFuture.channel().isOpen())\n                channelFuture.channel().close();\n\n            Throwable failedChannelCause = channelFuture.cause();\n\n            String causeString = \"\";\n            if (failedChannelCause != null && failedChannelCause.getMessage() != null)\n                causeString = failedChannelCause.getMessage();\n\n            if (causeString.contains(\"in use\"))\n            {\n                throw new ConfigurationException(bind + \" is in use by another process.  Change listen_address:storage_port \" +\n                                                 \"in cassandra.yaml to values that do not conflict with other services\");\n            }\n            else if (causeString.contains(\"cannot assign requested address\"))\n            {\n                throw new ConfigurationException(\"Unable to bind to address \" + bind\n                                                 + \". Set listen_address in cassandra.yaml to an interface you can bind to, e.g., your private IP address on EC2\");\n            }\n            else\n            {\n                throw new ConfigurationException(\"failed to bind to: \" + bind, failedChannelCause);\n            }\n        }\n\n        return channelFuture;\n    }\n\n    public static ChannelFuture bind(InboundConnectionSettings settings, ChannelGroup channelGroup,\n                                     Consumer<ChannelPipeline> pipelineInjector)","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/net/InboundConnectionInitiator.java#L181-L217","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"// before (cassandra.yaml)\nstorage_port: 7000\n// after\nstorage_port: 7011  # after verifying 7011 is free: ss -ltn | grep 7011","handlingStrategy":"validation","validationCode":"#!/bin/bash\nif ss -ltn | grep -q ':7000 '; then echo \"port 7000 already in use\"; exit 1; fi","typeGuard":null,"tryCatchPattern":"try { startCassandra(); } catch (ConfigurationException e) { if (e.getMessage().contains(\"in use by another process\")) { /* free the port or change storage_port */ } }","preventionTips":["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"],"tags":["network","bind","port-conflict","configuration"],"backgroundTag":"address-already-in-use","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"}