Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9407

TestFileTruncate fails with BindException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      https://builds.apache.org/job/Hadoop-Hdfs-trunk/2530/

      java.net.BindException: Problem binding to [localhost:8020] java.net.BindException: Address already in use; For more details see:  http://wiki.apache.org/hadoop/BindException
              at sun.nio.ch.Net.bind0(Native Method)
              at sun.nio.ch.Net.bind(Net.java:444)
              at sun.nio.ch.Net.bind(Net.java:436)
              at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
              at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
              at org.apache.hadoop.ipc.Server.bind(Server.java:469)
              at org.apache.hadoop.ipc.Server$Listener.<init>(Server.java:695)
              at org.apache.hadoop.ipc.Server.<init>(Server.java:2464)
              at org.apache.hadoop.ipc.RPC$Server.<init>(RPC.java:945)
              at org.apache.hadoop.ipc.ProtobufRpcEngine$Server.<init>(ProtobufRpcEngine.java:535)
              at org.apache.hadoop.ipc.ProtobufRpcEngine.getServer(ProtobufRpcEngine.java:510)
              at org.apache.hadoop.ipc.RPC$Builder.build(RPC.java:787)
              at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.<init>(NameNodeRpcServer.java:390)
              at org.apache.hadoop.hdfs.server.namenode.NameNode.createRpcServer(NameNode.java:742)
              at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:680)
              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.MiniDFSCluster.createNameNode(MiniDFSCluster.java:1247)
              at org.apache.hadoop.hdfs.MiniDFSCluster.configureNameService(MiniDFSCluster.java:1016)
              at org.apache.hadoop.hdfs.MiniDFSCluster.createNameNodesAndSetConf(MiniDFSCluster.java:891)
              at org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(MiniDFSCluster.java:823)
              at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:482)
              at org.apache.hadoop.hdfs.MiniDFSCluster$Builder.build(MiniDFSCluster.java:441)
              at org.apache.hadoop.hdfs.server.namenode.TestFileTruncate.setUp(TestFileTruncate.java:103)
      
      1. HDFS-9407.patch
        1 kB
        Brahma Reddy Battula
      2. HDFS-9407-002.patch
        0.9 kB
        Brahma Reddy Battula
      3. HDFS-9407-003.patch
        2 kB
        Brahma Reddy Battula

        Issue Links

          Activity

          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Uploaded the patch to get random port.Kindly review..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Uploaded the patch to get random port.Kindly review..
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 8s docker + precommit patch detected.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 3m 22s trunk passed
          +1 compile 0m 45s trunk passed with JDK v1.8.0_66
          +1 compile 0m 39s trunk passed with JDK v1.7.0_79
          +1 checkstyle 0m 19s trunk passed
          +1 mvneclipse 0m 16s trunk passed
          +1 findbugs 2m 27s trunk passed
          +1 javadoc 1m 26s trunk passed with JDK v1.8.0_66
          +1 javadoc 2m 52s trunk passed with JDK v1.7.0_79
          +1 mvninstall 0m 44s the patch passed
          +1 compile 0m 40s the patch passed with JDK v1.8.0_66
          +1 javac 0m 40s the patch passed
          +1 compile 0m 37s the patch passed with JDK v1.7.0_79
          +1 javac 0m 37s the patch passed
          +1 checkstyle 0m 18s the patch passed
          +1 mvneclipse 0m 15s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 2m 26s the patch passed
          +1 javadoc 1m 20s the patch passed with JDK v1.8.0_66
          +1 javadoc 2m 2s the patch passed with JDK v1.7.0_79
          -1 unit 73m 1s hadoop-hdfs in the patch failed with JDK v1.8.0_66.
          -1 unit 70m 1s hadoop-hdfs in the patch failed with JDK v1.7.0_79.
          -1 asflicense 0m 21s Patch generated 56 ASF License warnings.
          166m 54s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.datanode.TestBlockScanner
            hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped
            hadoop.hdfs.TestRollingUpgrade
            hadoop.hdfs.TestDFSStripedOutputStream
            hadoop.hdfs.server.namenode.ha.TestSeveralNameNodes
          JDK v1.7.0_79 Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer
            hadoop.hdfs.TestRecoverStripedFile
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure100
            hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes
            hadoop.hdfs.server.datanode.fsdataset.impl.TestScrLazyPersistFiles



          Subsystem Report/Notes
          Docker Client=1.7.0 Server=1.7.0 Image:test-patch-base-hadoop-date2015-11-10
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12771537/HDFS-9407.patch
          JIRA Issue HDFS-9407
          Optional Tests asflicense javac javadoc mvninstall unit findbugs checkstyle compile
          uname Linux 770714d5deee 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-ee5baeb/precommit/personality/hadoop.sh
          git revision trunk / 0eb9c60
          Default Java 1.7.0_79
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_79
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt
          unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt
          JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13456/testReport/
          asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-asflicense-problems.txt
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Max memory used 226MB
          Powered by Apache Yetus http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13456/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 8s docker + precommit patch detected. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 3m 22s trunk passed +1 compile 0m 45s trunk passed with JDK v1.8.0_66 +1 compile 0m 39s trunk passed with JDK v1.7.0_79 +1 checkstyle 0m 19s trunk passed +1 mvneclipse 0m 16s trunk passed +1 findbugs 2m 27s trunk passed +1 javadoc 1m 26s trunk passed with JDK v1.8.0_66 +1 javadoc 2m 52s trunk passed with JDK v1.7.0_79 +1 mvninstall 0m 44s the patch passed +1 compile 0m 40s the patch passed with JDK v1.8.0_66 +1 javac 0m 40s the patch passed +1 compile 0m 37s the patch passed with JDK v1.7.0_79 +1 javac 0m 37s the patch passed +1 checkstyle 0m 18s the patch passed +1 mvneclipse 0m 15s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 26s the patch passed +1 javadoc 1m 20s the patch passed with JDK v1.8.0_66 +1 javadoc 2m 2s the patch passed with JDK v1.7.0_79 -1 unit 73m 1s hadoop-hdfs in the patch failed with JDK v1.8.0_66. -1 unit 70m 1s hadoop-hdfs in the patch failed with JDK v1.7.0_79. -1 asflicense 0m 21s Patch generated 56 ASF License warnings. 166m 54s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.hdfs.server.datanode.TestBlockScanner   hadoop.hdfs.server.blockmanagement.TestBlockTokenWithDFSStriped   hadoop.hdfs.TestRollingUpgrade   hadoop.hdfs.TestDFSStripedOutputStream   hadoop.hdfs.server.namenode.ha.TestSeveralNameNodes JDK v1.7.0_79 Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer   hadoop.hdfs.TestRecoverStripedFile   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure100   hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes   hadoop.hdfs.server.datanode.fsdataset.impl.TestScrLazyPersistFiles Subsystem Report/Notes Docker Client=1.7.0 Server=1.7.0 Image:test-patch-base-hadoop-date2015-11-10 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12771537/HDFS-9407.patch JIRA Issue HDFS-9407 Optional Tests asflicense javac javadoc mvninstall unit findbugs checkstyle compile uname Linux 770714d5deee 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-ee5baeb/precommit/personality/hadoop.sh git revision trunk / 0eb9c60 Default Java 1.7.0_79 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_66 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_79 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_79.txt JDK v1.7.0_79 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13456/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13456/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Max memory used 226MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13456/console This message was automatically generated.
          Hide
          liuml07 Mingliang Liu added a comment -
          -        .nameNodePort(HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT)
          +        .nameNodePort(
          +            ServerSocketUtil.getPort(
          +                HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT, 10))
          

          I don't think it's necessary to specify the name node RPC port. Even if we try a specific port multiple times (here 10), port binding conflict still has a chance to happen. There should not be any logic in the test that depends on the port number.

          Show
          liuml07 Mingliang Liu added a comment - - .nameNodePort(HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT) + .nameNodePort( + ServerSocketUtil.getPort( + HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT, 10)) I don't think it's necessary to specify the name node RPC port. Even if we try a specific port multiple times (here 10 ), port binding conflict still has a chance to happen. There should not be any logic in the test that depends on the port number.
          Hide
          shv Konstantin Shvachko added a comment -

          Yes, just removing the line
          - .nameNodePort(HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT)
          should fix it, as port 0 will mean choosing a free one.

          Show
          shv Konstantin Shvachko added a comment - Yes, just removing the line - .nameNodePort(HdfsClientConfigKeys.DFS_NAMENODE_RPC_PORT_DEFAULT) should fix it, as port 0 will mean choosing a free one.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Mingliang Liu and Konstantin Shvachko thanks a lot for taking a look into this issue..Yes, I agree with you people.
          Uploaded the patch, kindly review..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Mingliang Liu and Konstantin Shvachko thanks a lot for taking a look into this issue..Yes, I agree with you people. Uploaded the patch, kindly review..
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 11s docker + precommit patch detected.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 7m 59s trunk passed
          +1 compile 0m 51s trunk passed with JDK v1.8.0_66
          +1 compile 0m 42s trunk passed with JDK v1.7.0_85
          +1 checkstyle 0m 16s trunk passed
          +1 mvnsite 0m 59s trunk passed
          +1 mvneclipse 0m 15s trunk passed
          +1 findbugs 2m 8s trunk passed
          +1 javadoc 1m 15s trunk passed with JDK v1.8.0_66
          +1 javadoc 1m 54s trunk passed with JDK v1.7.0_85
          +1 mvninstall 0m 50s the patch passed
          +1 compile 0m 42s the patch passed with JDK v1.8.0_66
          +1 javac 0m 42s the patch passed
          +1 compile 0m 45s the patch passed with JDK v1.7.0_85
          +1 javac 0m 45s the patch passed
          +1 checkstyle 0m 15s the patch passed
          +1 mvnsite 0m 54s the patch passed
          +1 mvneclipse 0m 15s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 2m 6s the patch passed
          +1 javadoc 1m 10s the patch passed with JDK v1.8.0_66
          +1 javadoc 1m 46s the patch passed with JDK v1.7.0_85
          +1 unit 51m 38s hadoop-hdfs in the patch passed with JDK v1.8.0_66.
          -1 unit 56m 0s hadoop-hdfs in the patch failed with JDK v1.7.0_85.
          -1 asflicense 0m 29s Patch generated 56 ASF License warnings.
          136m 4s



          Reason Tests
          JDK v1.7.0_85 Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:date2015-11-18
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12772905/HDFS-9407-002.patch
          JIRA Issue HDFS-9407
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 8753b6720148 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-3f4279a/precommit/personality/hadoop.sh
          git revision trunk / 7fab5c8
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13543/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_85.txt
          unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13543/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_85.txt
          JDK v1.7.0_85 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13543/testReport/
          asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13543/artifact/patchprocess/patch-asflicense-problems.txt
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Max memory used 76MB
          Powered by Apache Yetus http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13543/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 11s docker + precommit patch detected. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 59s trunk passed +1 compile 0m 51s trunk passed with JDK v1.8.0_66 +1 compile 0m 42s trunk passed with JDK v1.7.0_85 +1 checkstyle 0m 16s trunk passed +1 mvnsite 0m 59s trunk passed +1 mvneclipse 0m 15s trunk passed +1 findbugs 2m 8s trunk passed +1 javadoc 1m 15s trunk passed with JDK v1.8.0_66 +1 javadoc 1m 54s trunk passed with JDK v1.7.0_85 +1 mvninstall 0m 50s the patch passed +1 compile 0m 42s the patch passed with JDK v1.8.0_66 +1 javac 0m 42s the patch passed +1 compile 0m 45s the patch passed with JDK v1.7.0_85 +1 javac 0m 45s the patch passed +1 checkstyle 0m 15s the patch passed +1 mvnsite 0m 54s the patch passed +1 mvneclipse 0m 15s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 6s the patch passed +1 javadoc 1m 10s the patch passed with JDK v1.8.0_66 +1 javadoc 1m 46s the patch passed with JDK v1.7.0_85 +1 unit 51m 38s hadoop-hdfs in the patch passed with JDK v1.8.0_66. -1 unit 56m 0s hadoop-hdfs in the patch failed with JDK v1.7.0_85. -1 asflicense 0m 29s Patch generated 56 ASF License warnings. 136m 4s Reason Tests JDK v1.7.0_85 Failed junit tests hadoop.hdfs.server.namenode.ha.TestEditLogTailer Subsystem Report/Notes Docker Image:yetus/hadoop:date2015-11-18 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12772905/HDFS-9407-002.patch JIRA Issue HDFS-9407 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 8753b6720148 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /home/jenkins/jenkins-slave/workspace/PreCommit-HDFS-Build/patchprocess/apache-yetus-3f4279a/precommit/personality/hadoop.sh git revision trunk / 7fab5c8 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/13543/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_85.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13543/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_85.txt JDK v1.7.0_85 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13543/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13543/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Max memory used 76MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13543/console This message was automatically generated.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Test failure is unrelated..Kindly Review..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Test failure is unrelated..Kindly Review..
          Hide
          walter.k.su Walter Su added a comment -

          I think the point of specifically setting a RPC port, is to keep the port when cluster restarts. We can do it by

            static void restartCluster(StartupOption o)
                throws IOException {
          ..
            final int nnport = cluster.getNameNodePort();
            cluster = new MiniDFSCluster.Builder(conf).nameNodePort(nnport)....
          
          Show
          walter.k.su Walter Su added a comment - I think the point of specifically setting a RPC port, is to keep the port when cluster restarts. We can do it by static void restartCluster(StartupOption o) throws IOException { .. final int nnport = cluster.getNameNodePort(); cluster = new MiniDFSCluster.Builder(conf).nameNodePort(nnport)....
          Hide
          shv Konstantin Shvachko added a comment -

          Walter, yes keeping a specific port during a restart is needed when we expect something (clients, DataNodes) to be looking for the NameNode at that exact port. In TestFileTruncate we restart the whole cluster and reset the client, so the default port should work correctly here.

          +1 for the patch

          > Test failure is unrelated..
          Yes it is unrelated, but it is another BindException. Some previous test did not shut down NameNode properly. May be useful to investigate this in another jira.

          Show
          shv Konstantin Shvachko added a comment - Walter, yes keeping a specific port during a restart is needed when we expect something (clients, DataNodes) to be looking for the NameNode at that exact port. In TestFileTruncate we restart the whole cluster and reset the client, so the default port should work correctly here. +1 for the patch > Test failure is unrelated.. Yes it is unrelated, but it is another BindException . Some previous test did not shut down NameNode properly. May be useful to investigate this in another jira.
          Hide
          liuml07 Mingliang Liu added a comment -

          In TestFileTruncate we restart the whole cluster and reset the client, so the default port should work correctly here.

          Agreed. Keeping the NN port when the mini-cluster restarts, on a multi-tenant host, is hard even using MiniDFSCluster#restartNameNode. We should fix test code that depends on specific port.

          Yes it is unrelated, but it is another BindException.

          Nice catch. I guess it also tries to set the NN port when building a cluster. Brahma Reddy Battula, would you like work on that?

          Show
          liuml07 Mingliang Liu added a comment - In TestFileTruncate we restart the whole cluster and reset the client, so the default port should work correctly here. Agreed. Keeping the NN port when the mini-cluster restarts, on a multi-tenant host, is hard even using MiniDFSCluster#restartNameNode . We should fix test code that depends on specific port. Yes it is unrelated, but it is another BindException. Nice catch. I guess it also tries to set the NN port when building a cluster. Brahma Reddy Battula , would you like work on that?
          Hide
          shv Konstantin Shvachko added a comment -

          Just to clarify, I do not advocate fixing tests dependence on a specific NN port. For some of them it is intrinsic.
          E.g., if you want to bounce NN and keep DNs running, or test HA fail over.

          I think we should just find and fix the tests that do not release the resources properly - not close NN in the case.

          Show
          shv Konstantin Shvachko added a comment - Just to clarify, I do not advocate fixing tests dependence on a specific NN port. For some of them it is intrinsic. E.g., if you want to bounce NN and keep DNs running, or test HA fail over. I think we should just find and fix the tests that do not release the resources properly - not close NN in the case.
          Hide
          liuml07 Mingliang Liu added a comment -

          Thanks for your clarification. Yes, the intrinsic dependencies above make sense to me. Calling restartNameNode method to bounce NN may be better than building a new MiniCluster using the same port.

          Not releasing the resources properly should be fixed for sure. I'm afraid multiple test cases asking for the same port still have a chance to fail with BindException even they close NN. If the case is not actually depending on the specific port, using default 0 will work just fine.

          Show
          liuml07 Mingliang Liu added a comment - Thanks for your clarification. Yes, the intrinsic dependencies above make sense to me. Calling restartNameNode method to bounce NN may be better than building a new MiniCluster using the same port. Not releasing the resources properly should be fixed for sure. I'm afraid multiple test cases asking for the same port still have a chance to fail with BindException even they close NN. If the case is not actually depending on the specific port, using default 0 will work just fine.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Yes it is unrelated, but it is another BindException. Some previous test did not shut down NameNode properly. May be useful to investigate this in another jira.

          Konstantin Shvachko HDFS-9444 raised to investigate on this.

          Show
          brahmareddy Brahma Reddy Battula added a comment - Yes it is unrelated, but it is another BindException. Some previous test did not shut down NameNode properly. May be useful to investigate this in another jira. Konstantin Shvachko HDFS-9444 raised to investigate on this.
          Hide
          shv Konstantin Shvachko added a comment -

          Actually, could you please also revert the change of HDFS-9224, which introduced port 10 in restartCluster().
          I did not notice that change going in.
          As we agreed above, restarting the entire cluster does not require NN to be on any specific port. Would it make sense?

          Show
          shv Konstantin Shvachko added a comment - Actually, could you please also revert the change of HDFS-9224 , which introduced port 10 in restartCluster() . I did not notice that change going in. As we agreed above, restarting the entire cluster does not require NN to be on any specific port. Would it make sense?
          Hide
          shv Konstantin Shvachko added a comment -

          I meant not revert HDFS-9224, but rather remove the port setting altogether in restartCluster(). Sorry.

          Show
          shv Konstantin Shvachko added a comment - I meant not revert HDFS-9224 , but rather remove the port setting altogether in restartCluster() . Sorry.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Konstantin Shvachko updated the patch..Kindly Review.. thanks..

          Show
          brahmareddy Brahma Reddy Battula added a comment - Konstantin Shvachko updated the patch..Kindly Review.. thanks..
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 0s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
          +1 mvninstall 11m 30s trunk passed
          +1 compile 1m 17s trunk passed with JDK v1.8.0_66
          +1 compile 1m 0s trunk passed with JDK v1.7.0_85
          +1 checkstyle 0m 22s trunk passed
          +1 mvnsite 1m 16s trunk passed
          +1 mvneclipse 0m 18s trunk passed
          +1 findbugs 2m 44s trunk passed
          +1 javadoc 1m 46s trunk passed with JDK v1.8.0_66
          +1 javadoc 2m 40s trunk passed with JDK v1.7.0_85
          +1 mvninstall 1m 10s the patch passed
          +1 compile 1m 18s the patch passed with JDK v1.8.0_66
          +1 javac 1m 18s the patch passed
          +1 compile 1m 0s the patch passed with JDK v1.7.0_85
          +1 javac 1m 0s the patch passed
          +1 checkstyle 0m 22s the patch passed
          +1 mvnsite 1m 15s the patch passed
          +1 mvneclipse 0m 17s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 2m 54s the patch passed
          +1 javadoc 1m 44s the patch passed with JDK v1.8.0_66
          +1 javadoc 2m 45s the patch passed with JDK v1.7.0_85
          -1 unit 88m 56s hadoop-hdfs in the patch failed with JDK v1.8.0_66.
          -1 unit 77m 14s hadoop-hdfs in the patch failed with JDK v1.7.0_85.
          -1 asflicense 0m 24s Patch generated 56 ASF License warnings.
          206m 0s



          Reason Tests
          JDK v1.8.0_66 Failed junit tests hadoop.hdfs.TestPersistBlocks
            hadoop.security.TestPermission
            hadoop.hdfs.TestAclsEndToEnd
            hadoop.hdfs.TestDFSUpgradeFromImage
            hadoop.hdfs.security.TestDelegationTokenForProxyUser
            hadoop.hdfs.TestEncryptionZonesWithKMS
            hadoop.hdfs.server.namenode.ha.TestSeveralNameNodes
            hadoop.hdfs.server.datanode.TestDirectoryScanner
          JDK v1.7.0_85 Failed junit tests hadoop.hdfs.TestRollingUpgrade
            hadoop.security.TestPermission
            hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider
            hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes
            hadoop.hdfs.TestDFSStripedOutputStreamWithFailure
            hadoop.hdfs.server.datanode.TestDirectoryScanner
            hadoop.hdfs.TestHDFSFileSystemContract
            hadoop.hdfs.server.datanode.TestBlockReplacement



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:0ca8df7
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12774249/HDFS-9407-003.patch
          JIRA Issue HDFS-9407
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux fbede8a154c5 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / b4c6b51
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt
          unit https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_85.txt
          unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_85.txt
          JDK v1.7.0_85 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13654/testReport/
          asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-asflicense-problems.txt
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Max memory used 76MB
          Powered by Apache Yetus http://yetus.apache.org
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13654/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 0s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 11m 30s trunk passed +1 compile 1m 17s trunk passed with JDK v1.8.0_66 +1 compile 1m 0s trunk passed with JDK v1.7.0_85 +1 checkstyle 0m 22s trunk passed +1 mvnsite 1m 16s trunk passed +1 mvneclipse 0m 18s trunk passed +1 findbugs 2m 44s trunk passed +1 javadoc 1m 46s trunk passed with JDK v1.8.0_66 +1 javadoc 2m 40s trunk passed with JDK v1.7.0_85 +1 mvninstall 1m 10s the patch passed +1 compile 1m 18s the patch passed with JDK v1.8.0_66 +1 javac 1m 18s the patch passed +1 compile 1m 0s the patch passed with JDK v1.7.0_85 +1 javac 1m 0s the patch passed +1 checkstyle 0m 22s the patch passed +1 mvnsite 1m 15s the patch passed +1 mvneclipse 0m 17s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 2m 54s the patch passed +1 javadoc 1m 44s the patch passed with JDK v1.8.0_66 +1 javadoc 2m 45s the patch passed with JDK v1.7.0_85 -1 unit 88m 56s hadoop-hdfs in the patch failed with JDK v1.8.0_66. -1 unit 77m 14s hadoop-hdfs in the patch failed with JDK v1.7.0_85. -1 asflicense 0m 24s Patch generated 56 ASF License warnings. 206m 0s Reason Tests JDK v1.8.0_66 Failed junit tests hadoop.hdfs.TestPersistBlocks   hadoop.security.TestPermission   hadoop.hdfs.TestAclsEndToEnd   hadoop.hdfs.TestDFSUpgradeFromImage   hadoop.hdfs.security.TestDelegationTokenForProxyUser   hadoop.hdfs.TestEncryptionZonesWithKMS   hadoop.hdfs.server.namenode.ha.TestSeveralNameNodes   hadoop.hdfs.server.datanode.TestDirectoryScanner JDK v1.7.0_85 Failed junit tests hadoop.hdfs.TestRollingUpgrade   hadoop.security.TestPermission   hadoop.hdfs.server.namenode.ha.TestRequestHedgingProxyProvider   hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes   hadoop.hdfs.TestDFSStripedOutputStreamWithFailure   hadoop.hdfs.server.datanode.TestDirectoryScanner   hadoop.hdfs.TestHDFSFileSystemContract   hadoop.hdfs.server.datanode.TestBlockReplacement Subsystem Report/Notes Docker Image:yetus/hadoop:0ca8df7 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12774249/HDFS-9407-003.patch JIRA Issue HDFS-9407 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux fbede8a154c5 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / b4c6b51 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt unit https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_85.txt unit test logs https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.8.0_66.txt https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-unit-hadoop-hdfs-project_hadoop-hdfs-jdk1.7.0_85.txt JDK v1.7.0_85 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/13654/testReport/ asflicense https://builds.apache.org/job/PreCommit-HDFS-Build/13654/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Max memory used 76MB Powered by Apache Yetus http://yetus.apache.org Console output https://builds.apache.org/job/PreCommit-HDFS-Build/13654/console This message was automatically generated.
          Hide
          stevel@apache.org Steve Loughran added a comment -

          its not just that there may not have been an NN shutdown, we are moving yetus and jenkins to builds in parallel.

          Tests cannot assume that the default port is free for use. Instead they should look for a free port and use that across the sequences of instances of their NNs.

          yes, there's still a risk that the port there can get bound in a race condition with other test runs, but hard coding the default is significantly more brittle

          Show
          stevel@apache.org Steve Loughran added a comment - its not just that there may not have been an NN shutdown, we are moving yetus and jenkins to builds in parallel. Tests cannot assume that the default port is free for use. Instead they should look for a free port and use that across the sequences of instances of their NNs. yes, there's still a risk that the port there can get bound in a race condition with other test runs, but hard coding the default is significantly more brittle
          Hide
          shv Konstantin Shvachko added a comment -

          I just committed this. Thank you Brahma Reddy Battula

          Show
          shv Konstantin Shvachko added a comment - I just committed this. Thank you Brahma Reddy Battula
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #8893 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8893/)
          HDFS-9407. TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #8893 (See https://builds.apache.org/job/Hadoop-trunk-Commit/8893/ ) HDFS-9407 . TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk #1456 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1456/)
          HDFS-9407. TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #1456 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/1456/ ) HDFS-9407 . TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2667 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2667/)
          HDFS-9407. TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2667 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2667/ ) HDFS-9407 . TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #725 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/725/)
          HDFS-9407. TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #725 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/725/ ) HDFS-9407 . TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2581 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2581/)
          HDFS-9407. TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2581 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2581/ ) HDFS-9407 . TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #736 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/736/)
          HDFS-9407. TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5)

          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #736 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/736/ ) HDFS-9407 . TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #645 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/645/)
          HDFS-9407. TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #645 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/645/ ) HDFS-9407 . TestFileTruncate should not use fixed NN port. Contributed by (shv: rev fc799ab16cc62b04fef5a416af30e4ae845dd7a5) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          Konstantin Shvachko Thanks a lot for review and commit and thanks to others!!

          Show
          brahmareddy Brahma Reddy Battula added a comment - Konstantin Shvachko Thanks a lot for review and commit and thanks to others!!

            People

            • Assignee:
              brahmareddy Brahma Reddy Battula
              Reporter:
              brahmareddy Brahma Reddy Battula
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development