hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HDFS-95) UnknownHostException if the system can't determine its own name and you go DNS.getIPs("name-of-an-unknown-interface");
Date Tue, 11 Feb 2014 00:58:19 GMT

     [ https://issues.apache.org/jira/browse/HDFS-95?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Steve Loughran resolved HDFS-95.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.21.0
         Assignee: Steve Loughran

fixed in HADOOP-3426

> UnknownHostException if the system can't determine its own name and you go DNS.getIPs("name-of-an-unknown-interface");
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-95
>                 URL: https://issues.apache.org/jira/browse/HDFS-95
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>             Fix For: 0.21.0
>
>
> If you give an interface that doesnt exist, DNS.getIPs falls back to 
> InetAddress.getLocalHost().getHostAddress()
> But there's an assumption there: that InetAddress.getLocalHost(). is valid. If it doesnt
resolve properly, you get an UnknownHostException
> java.net.UnknownHostException: k2: k2
> 	at java.net.InetAddress.getLocalHost(InetAddress.java:1353)
> 	at org.apache.hadoop.net.DNS.getIPs(DNS.java:96)
> 	at org.apache.hadoop.net.TestDNS.testIPsOfUnknownInterface(TestDNS.java:73)
> It is possible to catch this and return something else. The big question: what to fall
back to? 127.0.0.1 would be an obvious choice



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message