I tried that already, and in my case it doesn't seem to fix the problem.
For example (my short hostname is "udesktop"),

Running org.apache.hadoop.yarn.server.resourcemanager.TestAMAuthorization
Tests run: 4, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 11.936 sec
<<< FAILURE! - in
org.apache.hadoop.yarn.server.resourcemanager.TestAMAuthorization
testUnauthorizedAccess[0](org.apache.hadoop.yarn.server.resourcemanager.TestAMAuthorization)
 Time elapsed: 2.724 sec  <<< ERROR!
java.net.UnknownHostException: Invalid host name: local host is: (unknown);
destination host is: "udesktop":8030; java.net.UnknownHostException; For
more details see:  http://wiki.apache.org/hadoop/UnknownHost
at org.apache.hadoop.ipc.Client$Connection.<init>(Client.java:413)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1489)
at org.apache.hadoop.ipc.Client.call(Client.java:1424)
at org.apache.hadoop.ipc.Client.call(Client.java:1385)
at
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:230)
at com.sun.proxy.$Proxy14.registerApplicationMaster(Unknown Source)
at
org.apache.hadoop.yarn.api.impl.pb.client.ApplicationMasterProtocolPBClientImpl.registerApplicationMaster(ApplicationMasterProtocolPBClientImpl.java:106)
at
org.apache.hadoop.yarn.server.resourcemanager.TestAMAuthorization.testUnauthorizedAccess(TestAMAuthorization.java:281)

My /etc/hosts reads:

127.0.0.1       localhost       udesktop
127.0.1.1       udesktop
10.211.55.13    udesktop

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

How does that compare to your environment?

Thanks,
Sangjin


On Wed, Jan 6, 2016 at 8:57 AM, Arun Suresh <arun.sur...@gmail.com> wrote:

> Hello Sangjin
> I had similar problems recently.. Got around it by modifying my /etc/hosts.
> I just update the 127.0.0.1 entry to add the short hostname of the machine
> like so :
> ...
> 127.0.0.1 localhost <short-hostname>
> ...
>
>
> On Wed, Jan 6, 2016 at 8:52 AM, Sangjin Lee <sj...@apache.org> wrote:
>
> > Has anyone set up an ubuntu VM to build hadoop and run unit tests
> locally?
> > I'm familiar with setting up a linux machine to build and test hadoop,
> but
> > a VM (I'm using Parallels on mac) seems to cause issues regarding
> resolving
> > the localhost address. I get all kinds of UnknownHostExceptions and
> > variations. I would greatly appreciate the pointers if anyone has set
> that
> > up successfully. Thanks!
> >
> > Regards,
> > Sangjin
> >
>

Reply via email to