hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6797) DNS#getHosts() fallback leads to mix of network-interface addresse in case reverse lookup fails
Date Thu, 03 Jun 2010 14:08:06 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-6797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875120#action_12875120
] 

Steve Loughran commented on HADOOP-6797:
----------------------------------------

Anything can go wrong with networking given a sufficiently large number of machines. 
HADOOP-3426 covers machines throwing exceptions on getting their local name, HDFS-116 is an
NPE triggered by the same machine's "issues"


> DNS#getHosts() fallback leads to mix of network-interface addresse in case reverse lookup
fails
> -----------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-6797
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6797
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.2
>            Reporter: Johannes Zillmann
>
> org.apache.hadoop.net.DNS#getHosts():
> {noformat}
> public static String[] getHosts(String strInterface, String nameserver)
>     throws UnknownHostException {
>     String[] ips = getIPs(strInterface);
>     Vector<String> hosts = new Vector<String>();
>     for (int ctr = 0; ctr < ips.length; ctr++)
>       try {
>         hosts.add(reverseDns(InetAddress.getByName(ips[ctr]),
>                              nameserver));
>       } catch (Exception e) {
>       }
>     if (hosts.size() == 0)
>       return new String[] { InetAddress.getLocalHost().getCanonicalHostName() };
>     else
>       return hosts.toArray(new String[] {});
>   }
> {noformat}
> I have the situation where i choosing eth1 as network interface (fs.datanode.dns.interface
and mapred.tasktracker.dns.interface) which is the internal interface.
> The reverse lookup fails for eth1 so the fallback:
> {noformat}
>     if (hosts.size() == 0)
>       return new String[] { InetAddress.getLocalHost().getCanonicalHostName() };
> {noformat}
> comes to action. The dns of eth0 is returned which is the external interface.
> This leads in my case to a combination of internal ip and external dns as the default
ip/host.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message