hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12474) MiniKMS should use random ports for Jetty server by default
Date Tue, 13 Oct 2015 22:04:09 GMT

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

Hudson commented on HADOOP-12474:
---------------------------------

FAILURE: Integrated in Hadoop-Yarn-trunk #1259 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk/1259/])
HADOOP-12474. MiniKMS should use random ports for Jetty server by (wheat9: rev 7f00fcac77afa7b8ddebb12f6e6266b030a96bd0)
* hadoop-common-project/hadoop-common/CHANGES.txt
* hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/MiniKMS.java


> MiniKMS should use random ports for Jetty server by default
> -----------------------------------------------------------
>
>                 Key: HADOOP-12474
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12474
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Mingliang Liu
>            Assignee: Mingliang Liu
>             Fix For: 2.8.0
>
>         Attachments: HADOOP-12474.000.patch, HADOOP-12474.001.patch
>
>
> In {{MiniKMS}}, there is potential data race when create jetty server in {{createJettyServer}}.
It looks like the code searches for a free port and then starts jetty, but maybe there's enough
of a race condition between port location and jetty.start to cause intermittent failures.
> {code}
>       ServerSocket ss = new ServerSocket((inPort < 0) ? 0 : inPort, 50, localhost);
>       int port = ss.getLocalPort();
>       Server server = new Server(0);
>       if (!ssl) {
>         server.getConnectors()[0].setHost(host);
>         server.getConnectors()[0].setPort(port);
>       } else {
>         ...
>         c.setPort(port);
> {code}
> We've seen test failures saying {{java.net.BindException: Address already in use}}, e.g.
[https://builds.apache.org/job/PreCommit-HDFS-Build/12942/testReport/]
> As in [HADOOP-12417], we should always bind port 0 which gives us an ephemeral port,
instead of searching a free port before starting jetty.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message