UnknownHostException while formatting HDFS UnknownHostException while formatting HDFS hadoop hadoop

UnknownHostException while formatting HDFS


It looks like some where the configuration is returning/ using the hostname as CentOSHost.

What does hostname --fqdn returns to you?

For Hadoop, it is important that name look-up and reverse look-up work successfully. You should be able to resolve the ip-address and resolve hostname from the ip-address (Reverse resolution). This can be tested using the above command.

The entry to /etc/hosts is required for the reverse resolution to work. Unless the entry and the configuration are pointing to localhost. Even in that case the hostname --fqdn should return as localhost.