[
https://issues.apache.org/jira/browse/HDFS-9458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15024906#comment-15024906
]
Chris Nauroth commented on HDFS-9458:
-------------------------------------
I first noticed the problem in a pre-commit run for HDFS-9451. The JDK 8 run
showed a failure in
{{TestBackupNode#startBackupNodeWithIncorrectAuthentication}}. Browsing the
code, it looks like it overrides the BackupNode HTTP address, but not the main
NameNode HTTP address. Maybe there are similar problems with the RPC ports
too. It would be worth a full code review of that suite to check for problems
like this.
https://builds.apache.org/job/PreCommit-HDFS-Build/13631/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
{code}
Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 29.939 sec <<<
FAILURE! - in org.apache.hadoop.hdfs.server.namenode.TestBackupNode
startBackupNodeWithIncorrectAuthentication(org.apache.hadoop.hdfs.server.namenode.TestBackupNode)
Time elapsed: 0.127 sec <<< ERROR!
java.net.BindException: Port in use: 0.0.0.0:50070
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
at
org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:901)
at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:843)
at
org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.start(NameNodeHttpServer.java:142)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpServer(NameNode.java:821)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:675)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:883)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:862)
at
org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1564)
at
org.apache.hadoop.hdfs.server.namenode.TestBackupNode.startBackupNodeWithIncorrectAuthentication(TestBackupNode.java:169)
{code}
> TestBackupNode always binds to port 50070, which can cause bind failures.
> -------------------------------------------------------------------------
>
> Key: HDFS-9458
> URL: https://issues.apache.org/jira/browse/HDFS-9458
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: test
> Reporter: Chris Nauroth
>
> {{TestBackupNode}} does not override port settings to use a dynamically
> selected port for the NameNode HTTP server. It uses the default of 50070
> defined in hdfs-default.xml. This should be changed to select a dynamic port
> to avoid bind errors.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)