Search code examples
hadoopubuntu-12.04cloudera

Cloudera CDH4: Can't add a host to my cluster because canonical name is not consistent with hostname


I am installing CDH4 on a 4-node cluster using Ubuntu 12.04 LTS. I am able to install cloudera manager and start a one-node cluster on the master machine. However, once I add a new host, CM says it has a bad health and throws the following error:

"The hostname and canonical name for this host are not consistent when checked from a Java process."

I modified the contents of /etc/hosts on the master and all the hosts to include the IP addresses followed by the FQDN of each machine. Do I also need to set-up a dns server to make this work?


Solution

  • You need not necessarily set up a DNS server to get this to work, but forward and reverse DNS must match explicitly for Hadoop to function properly.

    The Hadoop Operations book has a good example of how to write a simple Java program to validate your Forward + Reverse DNS are lined up. Of course, you can instrument this program further to help you debug in the event that they are not aligned.

    Should you have to address this, a combination of host entries, NIC configs, and/or records in a hosted name server will most likely be needed.