[ 
https://issues.apache.org/jira/browse/YARN-4352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15065685#comment-15065685
 ] 

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". {{ 
InetAddress.getByName(null)}}
{noformat}
       // 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);
          }
        }
{noformat}

I have provided more detailed comment in 
[YARN-4306-Analysis|https://issues.apache.org/jira/browse/YARN-4306?focusedCommentId=15030122&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15030122]
 and possible solutions are

Solution:
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
(v6.3.4#6332)

Reply via email to