cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dinesh Joshi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-14544) Server.java swallows the reason why binding failed
Date Wed, 27 Jun 2018 22:01:00 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-14544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16525664#comment-16525664
] 

Dinesh Joshi commented on CASSANDRA-14544:
------------------------------------------

So... after struggling with {{MessagingServiceTest}} failures on CircleCI, I was able to
determine that the failures on CircleCI are unrelated to this patch. It seems CircleCI containers
are not isolated and the failure is due to multiple tests attempting to listen on the same
IP/Port combination simultaneously.

Anyway, I'm +1 on this patch. [~aweisberg] could you please help commit this patch?

> Server.java swallows the reason why binding failed
> --------------------------------------------------
>
>                 Key: CASSANDRA-14544
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14544
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: James Roper
>            Assignee: James Roper
>            Priority: Major
>             Fix For: 4.0
>
>
> On line 164 of {{org/apache/cassandra/transport/Server.java}}, the cause of a failure
to bind to the server port is swallowed:
> [https://github.com/apache/cassandra/blob/06209037ea56b5a2a49615a99f1542d6ea1b2947/src/java/org/apache/cassandra/transport/Server.java#L163-L164]
> {code:java}
>         if (!bindFuture.awaitUninterruptibly().isSuccess())
>             throw new IllegalStateException(String.format("Failed to bind port %d on
%s.", socket.getPort(), socket.getAddress().getHostAddress()));
> {code}
> 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:
> {code:java}
>         if (!bindFuture.awaitUninterruptibly().isSuccess())
>             throw new IllegalStateException(String.format("Failed to bind port %d on
%s.", socket.getPort(), socket.getAddress().getHostAddress()),
>                 bindFuture.cause());
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message