[ https://issues.apache.org/jira/browse/YARN-8844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16638596#comment-16638596 ]
Eric Yang commented on YARN-8844: --------------------------------- The test is design to pass, when Socket exception is thrown. {code} 150 @Test(timeout = 20000) 151 public void testNMProxyRPCRetry() throws Exception { 152 conf.setLong(YarnConfiguration.CLIENT_NM_CONNECT_MAX_WAIT_MS, 1000); 153 conf.setLong(YarnConfiguration.CLIENT_NM_CONNECT_RETRY_INTERVAL_MS, 100); 154 StartContainersRequest allRequests = 155 Records.newRecord(StartContainersRequest.class); 156 Configuration newConf = new YarnConfiguration(conf); 157 newConf.setInt( 158 CommonConfigurationKeysPublic.IPC_CLIENT_CONNECT_MAX_RETRIES_KEY, 100); 159 160 newConf.setInt(CommonConfigurationKeysPublic. 161 IPC_CLIENT_CONNECT_MAX_RETRIES_ON_SOCKET_TIMEOUTS_KEY, 100); 162 // connect to some dummy address so that it can trigger 163 // connection failure and RPC level retires. 164 newConf.set(YarnConfiguration.NM_ADDRESS, "1234"); 165 ContainerManagementProtocol proxy = getNMProxy(newConf); 166 try { 167 proxy.startContainers(allRequests); 168 Assert.fail("should get socket exception"); 169 } catch (IOException e) { 170 // socket exception should be thrown immediately, without RPC retries. 171 Assert.assertTrue(e instanceof java.net.SocketException); 172 } 173 } {code} This test passes with Java 1.8.0_151, but it fails with Java 1.8.0_181. In Java 1.8.0_181, exception throw was java.net.UnknownHostException instead of SocketException. YARN configuration for the test case is to setup NM_ADDRESS=1234 without a hostname. This cause the test case to fail. The solution is to change NM_ADDRESS to 0.0.0.0:1234 to get SocketException instead of UnknownHostException. > TestNMProxy unit test is failing > -------------------------------- > > Key: YARN-8844 > URL: https://issues.apache.org/jira/browse/YARN-8844 > Project: Hadoop YARN > Issue Type: Bug > Components: yarn > Affects Versions: 3.3.0 > Reporter: Eric Yang > Priority: Major > > TestNMProxy has been failing in trunk for the last two or three weeks. > Investigating the failure. > {code} > [INFO] Running > org.apache.hadoop.yarn.server.nodemanager.containermanager.TestNMProxy > [ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.806 > s <<< FAILURE! - in > org.apache.hadoop.yarn.server.nodemanager.containermanager.TestNMProxy > [ERROR] > testNMProxyRPCRetry(org.apache.hadoop.yarn.server.nodemanager.containermanager.TestNMProxy) > Time elapsed: 1.188 s <<< FAILURE! > java.lang.AssertionError > 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:171) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at > org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org