Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.0, 2.7.3, 2.6.4, 3.0.0-alpha1
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Environment:

      OS X 10.11 with Oracle JDK 1.7.0_79
      Windows Server 2012 with Oracle JDK 1.7.0_79

    • Hadoop Flags:
      Reviewed

      Description

      The test ensures that java.net.SocketException is thrown from
      NMProxy.startContainers() without the RPC Request being retried.

      With Oracle JDK 1.7 on OS X & Windows BindException is thrown from startContainers().
      The testcase expects that SocketException is thrown - which is BindException's superclass.
      The exception type check is implemented using string compare and not reflection, therefore the thrown BindException is not accepted.

      Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 6.149 sec <<< FAILURE! - in org.apache.hadoop.yarn.server.nodemanager.containermanager.TestNMProxy
      testNMProxyRPCRetry(org.apache.hadoop.yarn.server.nodemanager.containermanager.TestNMProxy)  Time elapsed: 0.211 sec  <<< FAILURE!
      java.lang.AssertionError: null
      	at org.junit.Assert.fail(Assert.java:86)
      	at org.junit.Assert.assertTrue(Assert.java:41)
      	at org.junit.Assert.assertTrue(Assert.java:52)
      	at org.apache.hadoop.yarn.server.nodemanager.containermanager.TestNMProxy.testNMProxyRPCRetry(TestNMProxy.java:191)
      

      Actual exception:

      2016-04-02 21:25:13,311 WARN  [Thread-93] ipc.Client (Client.java:handleConnectionFailure(880)) - Failed to connect to server: 1234/0.0.4.210:0: retries get failed due to exceeded maximum allowed retries
      java.net.BindException: Can't assign requested address
              at sun.nio.ch.Net.connect0(Native Method)
              at sun.nio.ch.Net.connect(Net.java:465)
              at sun.nio.ch.Net.connect(Net.java:457)
              at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:670)
              at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:192)
              at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531)
              at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:495)
              at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:634)
              at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:733)
              at org.apache.hadoop.ipc.Client$Connection.access$2900(Client.java:378)
              at org.apache.hadoop.ipc.Client.getConnection(Client.java:1413)
              at org.apache.hadoop.ipc.Client.call(Client.java:1328)
              at org.apache.hadoop.ipc.Client.call(Client.java:1306)
              at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:230)
              at com.sun.proxy.$Proxy10.startContainers(Unknown Source)
      
      1. YARN-4916.01.patch
        1 kB
        Tibor Kiss
      2. YARN-4916.02-WiP.patch
        1 kB
        Tibor Kiss

        Issue Links

          Activity

          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 15s 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 6m 31s trunk passed
          +1 compile 0m 22s trunk passed with JDK v1.8.0_74
          +1 compile 0m 25s trunk passed with JDK v1.7.0_95
          +1 checkstyle 0m 16s trunk passed
          +1 mvnsite 0m 28s trunk passed
          +1 mvneclipse 0m 12s trunk passed
          +1 findbugs 0m 50s trunk passed
          +1 javadoc 0m 17s trunk passed with JDK v1.8.0_74
          +1 javadoc 0m 22s trunk passed with JDK v1.7.0_95
          +1 mvninstall 0m 23s the patch passed
          +1 compile 0m 20s the patch passed with JDK v1.8.0_74
          +1 javac 0m 20s the patch passed
          +1 compile 0m 23s the patch passed with JDK v1.7.0_95
          +1 javac 0m 23s the patch passed
          +1 checkstyle 0m 14s the patch passed
          +1 mvnsite 0m 25s the patch passed
          +1 mvneclipse 0m 10s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 0m 59s the patch passed
          +1 javadoc 0m 15s the patch passed with JDK v1.8.0_74
          +1 javadoc 0m 19s the patch passed with JDK v1.7.0_95
          -1 unit 8m 57s hadoop-yarn-server-nodemanager in the patch failed with JDK v1.8.0_74.
          -1 unit 9m 32s hadoop-yarn-server-nodemanager in the patch failed with JDK v1.7.0_95.
          +1 asflicense 0m 17s Patch does not generate ASF License warnings.
          33m 10s



          Reason Tests
          JDK v1.8.0_74 Failed junit tests hadoop.yarn.server.nodemanager.containermanager.TestNMProxy
          JDK v1.7.0_95 Failed junit tests hadoop.yarn.server.nodemanager.containermanager.TestNMProxy



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:fbe3e86
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12796688/YARN-4916.01.patch
          JIRA Issue YARN-4916
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux dcf36217378a 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 / 81d04ca
          Default Java 1.7.0_95
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-YARN-Build/10943/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.8.0_74.txt
          unit https://builds.apache.org/job/PreCommit-YARN-Build/10943/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.7.0_95.txt
          unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/10943/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-YARN-Build/10943/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.7.0_95.txt
          JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/10943/testReport/
          modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/10943/console
          Powered by Apache Yetus 0.2.0 http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 15s 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 6m 31s trunk passed +1 compile 0m 22s trunk passed with JDK v1.8.0_74 +1 compile 0m 25s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 16s trunk passed +1 mvnsite 0m 28s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 0m 50s trunk passed +1 javadoc 0m 17s trunk passed with JDK v1.8.0_74 +1 javadoc 0m 22s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 23s the patch passed +1 compile 0m 20s the patch passed with JDK v1.8.0_74 +1 javac 0m 20s the patch passed +1 compile 0m 23s the patch passed with JDK v1.7.0_95 +1 javac 0m 23s the patch passed +1 checkstyle 0m 14s the patch passed +1 mvnsite 0m 25s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 0m 59s the patch passed +1 javadoc 0m 15s the patch passed with JDK v1.8.0_74 +1 javadoc 0m 19s the patch passed with JDK v1.7.0_95 -1 unit 8m 57s hadoop-yarn-server-nodemanager in the patch failed with JDK v1.8.0_74. -1 unit 9m 32s hadoop-yarn-server-nodemanager in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 17s Patch does not generate ASF License warnings. 33m 10s Reason Tests JDK v1.8.0_74 Failed junit tests hadoop.yarn.server.nodemanager.containermanager.TestNMProxy JDK v1.7.0_95 Failed junit tests hadoop.yarn.server.nodemanager.containermanager.TestNMProxy Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12796688/YARN-4916.01.patch JIRA Issue YARN-4916 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux dcf36217378a 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 / 81d04ca Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-YARN-Build/10943/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.8.0_74.txt unit https://builds.apache.org/job/PreCommit-YARN-Build/10943/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/10943/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-YARN-Build/10943/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/10943/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager Console output https://builds.apache.org/job/PreCommit-YARN-Build/10943/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
          Hide
          tibor.kiss@gmail.com Tibor Kiss added a comment -

          Added some extra logging (Stack trace printout) to aid debugging.
          This is WiP version!

          Show
          tibor.kiss@gmail.com Tibor Kiss added a comment - Added some extra logging (Stack trace printout) to aid debugging. This is WiP version!
          Hide
          hadoopqa Hadoop QA added a comment -
          -1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 13s 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 6m 32s trunk passed
          +1 compile 0m 22s trunk passed with JDK v1.8.0_74
          +1 compile 0m 25s trunk passed with JDK v1.7.0_95
          +1 checkstyle 0m 15s trunk passed
          +1 mvnsite 0m 28s trunk passed
          +1 mvneclipse 0m 13s trunk passed
          +1 findbugs 0m 50s trunk passed
          +1 javadoc 0m 17s trunk passed with JDK v1.8.0_74
          +1 javadoc 0m 21s trunk passed with JDK v1.7.0_95
          +1 mvninstall 0m 24s the patch passed
          +1 compile 0m 19s the patch passed with JDK v1.8.0_74
          +1 javac 0m 19s the patch passed
          +1 compile 0m 24s the patch passed with JDK v1.7.0_95
          +1 javac 0m 24s the patch passed
          +1 checkstyle 0m 13s the patch passed
          +1 mvnsite 0m 25s the patch passed
          +1 mvneclipse 0m 10s the patch passed
          +1 whitespace 0m 0s Patch has no whitespace issues.
          +1 findbugs 1m 1s the patch passed
          +1 javadoc 0m 15s the patch passed with JDK v1.8.0_74
          +1 javadoc 0m 19s the patch passed with JDK v1.7.0_95
          -1 unit 8m 57s hadoop-yarn-server-nodemanager in the patch failed with JDK v1.8.0_74.
          -1 unit 9m 31s hadoop-yarn-server-nodemanager in the patch failed with JDK v1.7.0_95.
          +1 asflicense 0m 17s Patch does not generate ASF License warnings.
          33m 12s



          Reason Tests
          JDK v1.8.0_74 Failed junit tests hadoop.yarn.server.nodemanager.containermanager.TestNMProxy
          JDK v1.7.0_95 Failed junit tests hadoop.yarn.server.nodemanager.containermanager.TestNMProxy



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:fbe3e86
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12796704/YARN-4916.02-WiP.patch
          JIRA Issue YARN-4916
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 7f514291a8de 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 / 81d04ca
          Default Java 1.7.0_95
          Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95
          findbugs v3.0.0
          unit https://builds.apache.org/job/PreCommit-YARN-Build/10945/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.8.0_74.txt
          unit https://builds.apache.org/job/PreCommit-YARN-Build/10945/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.7.0_95.txt
          unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/10945/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-YARN-Build/10945/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.7.0_95.txt
          JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/10945/testReport/
          modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager
          Console output https://builds.apache.org/job/PreCommit-YARN-Build/10945/console
          Powered by Apache Yetus 0.2.0 http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 13s 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 6m 32s trunk passed +1 compile 0m 22s trunk passed with JDK v1.8.0_74 +1 compile 0m 25s trunk passed with JDK v1.7.0_95 +1 checkstyle 0m 15s trunk passed +1 mvnsite 0m 28s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 0m 50s trunk passed +1 javadoc 0m 17s trunk passed with JDK v1.8.0_74 +1 javadoc 0m 21s trunk passed with JDK v1.7.0_95 +1 mvninstall 0m 24s the patch passed +1 compile 0m 19s the patch passed with JDK v1.8.0_74 +1 javac 0m 19s the patch passed +1 compile 0m 24s the patch passed with JDK v1.7.0_95 +1 javac 0m 24s the patch passed +1 checkstyle 0m 13s the patch passed +1 mvnsite 0m 25s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s Patch has no whitespace issues. +1 findbugs 1m 1s the patch passed +1 javadoc 0m 15s the patch passed with JDK v1.8.0_74 +1 javadoc 0m 19s the patch passed with JDK v1.7.0_95 -1 unit 8m 57s hadoop-yarn-server-nodemanager in the patch failed with JDK v1.8.0_74. -1 unit 9m 31s hadoop-yarn-server-nodemanager in the patch failed with JDK v1.7.0_95. +1 asflicense 0m 17s Patch does not generate ASF License warnings. 33m 12s Reason Tests JDK v1.8.0_74 Failed junit tests hadoop.yarn.server.nodemanager.containermanager.TestNMProxy JDK v1.7.0_95 Failed junit tests hadoop.yarn.server.nodemanager.containermanager.TestNMProxy Subsystem Report/Notes Docker Image:yetus/hadoop:fbe3e86 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12796704/YARN-4916.02-WiP.patch JIRA Issue YARN-4916 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 7f514291a8de 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 / 81d04ca Default Java 1.7.0_95 Multi-JDK versions /usr/lib/jvm/java-8-oracle:1.8.0_74 /usr/lib/jvm/java-7-openjdk-amd64:1.7.0_95 findbugs v3.0.0 unit https://builds.apache.org/job/PreCommit-YARN-Build/10945/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.8.0_74.txt unit https://builds.apache.org/job/PreCommit-YARN-Build/10945/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.7.0_95.txt unit test logs https://builds.apache.org/job/PreCommit-YARN-Build/10945/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.8.0_74.txt https://builds.apache.org/job/PreCommit-YARN-Build/10945/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-nodemanager-jdk1.7.0_95.txt JDK v1.7.0_95 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/10945/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager Console output https://builds.apache.org/job/PreCommit-YARN-Build/10945/console Powered by Apache Yetus 0.2.0 http://yetus.apache.org This message was automatically generated.
          Hide
          tibor.kiss@gmail.com Tibor Kiss added a comment -

          The generated logs shows that in case of Linux SocketException is created, which is casted to IOException in NetUtils.wrapException:

          java.io.IOException: Failed on local exception: java.net.SocketException: Invalid argument; Host Details : local host is: "7f514291a8de/172.17.0.2"; destination host is: "1234":0; 
          	at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:787)
          	at org.apache.hadoop.ipc.Client.call(Client.java:1356)
          	at org.apache.hadoop.ipc.Client.call(Client.java:1306)
          	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:230)
          	at com.sun.proxy.$Proxy10.startContainers(Unknown Source)
          	at org.apache.hadoop.yarn.api.impl.pb.client.ContainerManagementProtocolPBClientImpl.startContainers(ContainerManagementProtocolPBClientImpl.java:101)
          ...
          

          In case of OS X & Windows BindException is created which is not casted to IOException at NetUtils.wrapException:

          java.net.BindException: Problem binding to [localhost/127.0.0.1:0] java.net.BindException: Can't assign requested address; For more details see:  http://wiki.apache.org/hadoop/BindException
                  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
                  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
                  at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:792)
                  at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:721)
                  at org.apache.hadoop.ipc.Client.call(Client.java:1479)
                  at org.apache.hadoop.ipc.Client.call(Client.java:1412)
                  at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229)
                  at com.sun.proxy.$Proxy10.startContainers(Unknown Source)
                  at org.apache.hadoop.yarn.api.impl.pb.client.ContainerManagementProtocolPBClientImpl.startContainers(ContainerManagementProtocolPBClientImpl.java:96)
          
          Show
          tibor.kiss@gmail.com Tibor Kiss added a comment - The generated logs shows that in case of Linux SocketException is created, which is casted to IOException in NetUtils.wrapException: java.io.IOException: Failed on local exception: java.net.SocketException: Invalid argument; Host Details : local host is: "7f514291a8de/172.17.0.2"; destination host is: "1234":0; at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:787) at org.apache.hadoop.ipc.Client.call(Client.java:1356) at org.apache.hadoop.ipc.Client.call(Client.java:1306) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:230) at com.sun.proxy.$Proxy10.startContainers(Unknown Source) at org.apache.hadoop.yarn.api.impl.pb.client.ContainerManagementProtocolPBClientImpl.startContainers(ContainerManagementProtocolPBClientImpl.java:101) ... In case of OS X & Windows BindException is created which is not casted to IOException at NetUtils.wrapException: java.net.BindException: Problem binding to [localhost/127.0.0.1:0] java.net.BindException: Can't assign requested address; For more details see: http://wiki.apache.org/hadoop/BindException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:792) at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:721) at org.apache.hadoop.ipc.Client.call(Client.java:1479) at org.apache.hadoop.ipc.Client.call(Client.java:1412) at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229) at com.sun.proxy.$Proxy10.startContainers(Unknown Source) at org.apache.hadoop.yarn.api.impl.pb.client.ContainerManagementProtocolPBClientImpl.startContainers(ContainerManagementProtocolPBClientImpl.java:96)
          Hide
          tibor.kiss@gmail.com Tibor Kiss added a comment -

          There are two ways to resolve this issue:
          a) extend NetUtils.wrapException to properly wrap SocketException
          b) extend the assert statement to get prepared to handle IOException (which is a wrapped SocketException) and (unwrapped) BindException

          I find option “a" more clean, but it involves a bit bigger change: the SocketException needs to be handled inside wrapException().
          I’m not sure at the moment what side-effect that will cause.

          Show
          tibor.kiss@gmail.com Tibor Kiss added a comment - There are two ways to resolve this issue: a) extend NetUtils.wrapException to properly wrap SocketException b) extend the assert statement to get prepared to handle IOException (which is a wrapped SocketException) and (unwrapped) BindException I find option “a" more clean, but it involves a bit bigger change: the SocketException needs to be handled inside wrapException(). I’m not sure at the moment what side-effect that will cause.
          Hide
          stevel@apache.org Steve Loughran added a comment -

          HADOOP-11212 covers the wrapping ... apply that patch and see if this problem goes away.

          regarding (b), you don't need to make assertions about exception type, just tighten the catch() clause to only cover the exception class you want.

          If you want to make asserts about exception text, use GenericTestUtils.assertExceptionContains(), as it rethrows the exception if there's no match. Stack traces are too important lose.

          Show
          stevel@apache.org Steve Loughran added a comment - HADOOP-11212 covers the wrapping ... apply that patch and see if this problem goes away. regarding (b), you don't need to make assertions about exception type, just tighten the catch() clause to only cover the exception class you want. If you want to make asserts about exception text, use GenericTestUtils.assertExceptionContains() , as it rethrows the exception if there's no match. Stack traces are too important lose.
          Hide
          tibor.kiss@gmail.com Tibor Kiss added a comment -

          Thanks Steve Loughran, HADOOP-11212 indeed fixes the problem.
          Applied your patch and ran TestNMProxy & TestNetUtils. Both are succeeding!

          Show
          tibor.kiss@gmail.com Tibor Kiss added a comment - Thanks Steve Loughran , HADOOP-11212 indeed fixes the problem. Applied your patch and ran TestNMProxy & TestNetUtils. Both are succeeding!
          Hide
          stevel@apache.org Steve Loughran added a comment -

          Nice to hear, but we need someone to +1 my patch.

          Show
          stevel@apache.org Steve Loughran added a comment - Nice to hear, but we need someone to +1 my patch.
          Hide
          djp Junping Du added a comment -

          I will take a look. Thanks Steve Loughran and Tibor Kiss.

          Show
          djp Junping Du added a comment - I will take a look. Thanks Steve Loughran and Tibor Kiss .
          Hide
          stevel@apache.org Steve Loughran added a comment -

          Tibor: to confirm, with HADOOP-11212 in, you don't need a patch to this test? Or is the patch here needed as well?

          Show
          stevel@apache.org Steve Loughran added a comment - Tibor: to confirm, with HADOOP-11212 in, you don't need a patch to this test? Or is the patch here needed as well?
          Hide
          tibor.kiss@gmail.com Tibor Kiss added a comment -

          Steve Loughran: This patch builds on top of HADOOP-11212, both are needed to resolve this issue.

          The YARN-4916.01.patch will resolve the problem both on Windows, OS X & Linux.

          Thanks

          Show
          tibor.kiss@gmail.com Tibor Kiss added a comment - Steve Loughran : This patch builds on top of HADOOP-11212 , both are needed to resolve this issue. The YARN-4916 .01.patch will resolve the problem both on Windows, OS X & Linux. Thanks
          Show
          brahmareddy Brahma Reddy Battula added a comment - Yes, this patch also required. TestNMProxy.tesNMProxyRPCRetry fails without this patch.It's started failing after HADOOP-11212 in jenkins precommit builds.....Hence YARN-4922 and YARN-4923 raised to track this. Precommit- Builds https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/1257/testReport/ https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/1261/testReport/ https://builds.apache.org/job/Hadoop-Yarn-trunk/1968/testReport/ https://builds.apache.org/job/Hadoop-Yarn-trunk/1971/testReport/ https://builds.apache.org/job/Hadoop-Yarn-trunk/1972/testReport/
          Hide
          djp Junping Du added a comment -

          Thanks Brahma Reddy Battula for verification on this.
          About 02 patch:
          e.printStackTrace(System.out); seems not necessary?
          Other looks good to me.

          Show
          djp Junping Du added a comment - Thanks Brahma Reddy Battula for verification on this. About 02 patch: e.printStackTrace(System.out); seems not necessary? Other looks good to me.
          Hide
          tibor.kiss@gmail.com Tibor Kiss added a comment -

          Junping Du: The difference between the first and second patch is the printStackTrace(). That's why I suggested pushing the first version (w/o stack trace): YARN-4916.01.patch
          Thanks!

          Show
          tibor.kiss@gmail.com Tibor Kiss added a comment - Junping Du : The difference between the first and second patch is the printStackTrace(). That's why I suggested pushing the first version (w/o stack trace): YARN-4916 .01.patch Thanks!
          Hide
          djp Junping Du added a comment -

          Thanks Tibor Kiss for clarification here. Just add you to YARN contributor and assign this JIRA to you.
          01 patch LGTM. +1. Will commit it shortly.

          Show
          djp Junping Du added a comment - Thanks Tibor Kiss for clarification here. Just add you to YARN contributor and assign this JIRA to you. 01 patch LGTM. +1. Will commit it shortly.
          Hide
          tibor.kiss@gmail.com Tibor Kiss added a comment -

          Thanks a lot Junping!

          Show
          tibor.kiss@gmail.com Tibor Kiss added a comment - Thanks a lot Junping!
          Hide
          djp Junping Du added a comment -

          I have commit the patch to trunk and branch-2. Thanks Tibor Kiss for the patch contribution and all for review and comments!

          Show
          djp Junping Du added a comment - I have commit the patch to trunk and branch-2. Thanks Tibor Kiss for the patch contribution and all for review and comments!
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #9560 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9560/)
          YARN-4916. TestNMProxy.tesNMProxyRPCRetry fails. Contributed by Tibor (junping_du: rev 00058167431475c6e63c80207424f1d365569e3a)

          • hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestNMProxy.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9560 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9560/ ) YARN-4916 . TestNMProxy.tesNMProxyRPCRetry fails. Contributed by Tibor (junping_du: rev 00058167431475c6e63c80207424f1d365569e3a) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestNMProxy.java
          Hide
          vinodkv Vinod Kumar Vavilapalli added a comment -

          Does this need to be on any of the older branches?

          Show
          vinodkv Vinod Kumar Vavilapalli added a comment - Does this need to be on any of the older branches?
          Hide
          djp Junping Du added a comment -

          Hi Vinod, this one is best to work with HADOOP-11212 which is in 2.9 so far. Before HADOOP-11212, the test won't failed on Linux but only on Windows/Mac for the reason in description. HADOOP-11212 wrap a better exception message but the test still check the old message. If needed, I can backport two patches to branch-2.8.

          Show
          djp Junping Du added a comment - Hi Vinod, this one is best to work with HADOOP-11212 which is in 2.9 so far. Before HADOOP-11212 , the test won't failed on Linux but only on Windows/Mac for the reason in description. HADOOP-11212 wrap a better exception message but the test still check the old message. If needed, I can backport two patches to branch-2.8.
          Hide
          brahmareddy Brahma Reddy Battula added a comment -

          adding the broken link...

          Show
          brahmareddy Brahma Reddy Battula added a comment - adding the broken link...
          Hide
          jlowe Jason Lowe added a comment -

          Thanks, Tibor Kiss! I committed this to branch-2.8 since HADOOP-11212 was also fixed in 2.8.0.

          Show
          jlowe Jason Lowe added a comment - Thanks, Tibor Kiss ! I committed this to branch-2.8 since HADOOP-11212 was also fixed in 2.8.0.

            People

            • Assignee:
              tibor.kiss@gmail.com Tibor Kiss
              Reporter:
              tibor.kiss@gmail.com Tibor Kiss
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development