UnknownHostException - Formatting HDFS on Mac OSX Mavericks

I'm attempting to run Hadoop 2.3 in pseudo-distributed mode on a MacBook Pro running OSX 10.9. I'm seeing the following error:

14/04/09 15:05:43 WARN net.DNS: Unable to determine address of the host-falling back to "localhost" address
java.net.UnknownHostException: crowlem8: crowlem8
    at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
    at org.apache.hadoop.net.DNS.resolveLocalHostIPAddress(DNS.java:287)
    at org.apache.hadoop.net.DNS.<clinit>(DNS.java:58)
    at org.apache.hadoop.hdfs.server.namenode.NNStorage.newBlockPoolID(NNStorage.java:914)
    at org.apache.hadoop.hdfs.server.namenode.NNStorage.newNamespaceInfo(NNStorage.java:550)
    at org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:144)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:829)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1218)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1325)
Caused by: java.net.UnknownHostException: crowlem8
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
    at java.net.InetAddress.getLocalHost(InetAddress.java:1469)

Any thoughts on how to resolve this? I saw the related question about UnknownHostExceptions while formatting HDFS on CentOS. Wasn't sure how to proceed based on that answer.


Turns out the solution was to add the following to /etc/hosts: localhost.localdomain localhost

in the above context was crowlem8

Need Your Help

Looking for a light-weight spring 3.x based CMS/Blog Engine

spring spring-mvc blogs

I would like to maintain a blog which is running on Java, preferably light-weight. Since I work with Spring a lot I thought it would be nice to have a Spring 3.x based CMS/Blog-engine (instead of r...

CSS - Confusion using the :hover method with images

css css3 hover image

I'm confused about proper practice when using the :hover method in CSS. In this example, I have a photo that upon hover, changes to a different photo. As I understand, there are two options though ...