Problem with InetAddress.getLocalHost() on Java 7

Paul Taylor paul_t100 at fastmail.fm
Mon Nov 11 01:09:04 PST 2013


On 11/11/2013 09:02, Alan Bateman wrote:
> On 08/11/2013 16:48, Paul Taylor wrote:
>> It works okay for me but for a particular customer 
>> InetAddress.getLocalHost() is failing with Java 7 although it works 
>> okay with Java 6 with the following exception
>>
>> java.net.UnknownHostException: rupert: rupert: nodename nor servname 
>> provided, or not known
>>     at java.net.InetAddress.getLocalHost(InetAddress.java:1466)
>> Caused by: java.net.UnknownHostException: rupert: nodename nor 
>> servname provided, or not known
>>     at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
>>     at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:894)
>>     at 
>> java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1286)
>>     at java.net.InetAddress.getLocalHost(InetAddress.java:1462)
>>
>> Is this by design ?
> This might be another case of JDK-7180557. Any chance that you could 
> try the most recent build of JDK 8 and see if it duplicates?
>
> -Alan
>
Trouble is I cannot replicate the problem myself even if remove entries 
from /etc/hosts it is only a problem some of my customers are having

Paul


More information about the macosx-port-dev mailing list