Sunil G commented on YARN-4352:

Hi [~djp]/[~rohithsharma]

I analyzed this issue along with YARN-4306. {{MiniYARNCluster}} is used here 
and YarnClient cannot connect to RM and throwing {{UnKnownHostException}}. This 
causes timeout in all these test cases.

{{QualifiedHostResolver}} is used in SecurityUtils for this cases 
({{useIpForTokenService}} is false). And I could see that {{/etc/hosts}} has 2 
loop back entries and 2nd one is the hostname of the machine. Hence below code 
will not return machine host name, instead it will return "localhost". {{ 
       // it's a simple host with no dots, ex. "host"
        // try the search list, then fallback to exact host
        InetAddress loopback = InetAddress.getByName(null);
        if (host.equalsIgnoreCase(loopback.getHostName())) {
          addr = InetAddress.getByAddress(host, loopback.getAddress());
        } else {
          addr = getByNameWithSearch(host);
          if (addr == null) {
            addr = getByExactName(host);

I have provided more detailed comment in 
 and possible solutions are

1, loopback address configuration can be changed to use hostname first in the 
list {{/etc/hosts}} in jenkins machine.
2, use DNS in jenkins machine
3, we can make changes in {{SecurityUtils#getByExactName}} where we check with 
given hostname itself before doing with hostname + ".".

> Timeout for tests in TestYarnClient, TestAMRMClient and TestNMClient
> --------------------------------------------------------------------
>                 Key: YARN-4352
>                 URL: https://issues.apache.org/jira/browse/YARN-4352
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Junping Du
>            Assignee: Sunil G
> From 
> https://builds.apache.org/job/PreCommit-YARN-Build/9661/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-client-jdk1.7.0_79.txt,
>  we can see the tests in TestYarnClient, TestAMRMClient and TestNMClient get 
> timeout which can be reproduced locally.

This message was sent by Atlassian JIRA

Reply via email to