Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Normal
Description
On line 164 of org/apache/cassandra/transport/Server.java, the cause of a failure to bind to the server port is swallowed:
if (!bindFuture.awaitUninterruptibly().isSuccess()) throw new IllegalStateException(String.format("Failed to bind port %d on %s.", socket.getPort(), socket.getAddress().getHostAddress()));
So we're told that the bind failed, but we're left guessing as to why. The cause of the bind failure should be passed to the IllegalStateException, so that we can then proceed with debugging, like so:
if (!bindFuture.awaitUninterruptibly().isSuccess()) throw new IllegalStateException(String.format("Failed to bind port %d on %s.", socket.getPort(), socket.getAddress().getHostAddress()), bindFuture.cause());