UnknownHostException problem - mikec964/chelmbigstock GitHub Wiki
You can find this problem described here: http://stackoverflow.com/questions/23307260/bin-hadoop-namenode-format-startup-msg-host-java-net-unknownhostexception
Use $hostname to find the name of your computer. It should match the hostname shown in the error message.
Check your /etc/hosts file to see if your hostname is in the list. If not, add it to the /etc/hosts file:
Robin:hadoop-1.2.1 hadoop$ cat /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
70.32.94.84 dev.hsdm.harvard.edu
So in this case, you might add a line that reads:
127.0.0.1 robin
To edit the file, use sudo vi /etc/hosts
.
You can check your ip address with $ifconfig.