I am setting up Hadoop 0.23.1 in a pseudo distributed mode on Fedora 17, when I tried to format the namenode using “bin/hadoop namenode -format” I came across the following error.
“net.DNS (DNS.java:resolveLocalHostname(184)) – Unable to determine local hostname -falling back to “localhost”
This can be solved by the changing the hostname to localhost
check the hostname by the command
change the hostname to localhost
to permanently change the hostname
1) debian based systems( example : ubuntu)
etc/hostname and enter localhost in it and run
2) RedHat based systems
/etc/sysconfig/network to enter the new hostname and new hostname is preserved even on reboot also.
the same problem is occured in the following link.