Configuring Network Names
- If you use Cloudera Manager, do not use these command-line instructions.
- This information applies specifically to CDH 5.5.x. If you use an earlier version of CDH, see the documentation for that version located at Cloudera Documentation.
To ensure that the members of the cluster can communicate with each other, do the following on every system.
CDH requires IPv4. IPv6 is not supported.
- Set the hostname of each system to a unique name (not
$ sudo hostname myhost-1Note
:This is a temporary measure only. The hostname set by hostname does not survive across reboots.
- Make sure the /etc/hosts file on each system contains the IP
addresses and fully-qualified domain names (FQDN) of all the members of
- The canonical name of each host in /etc/hosts must be the FQDN (for example myhost-1.mynet.myco.com), not the unqualified hostname (for example myhost-1). The canonical name is the first entry after the IP address.
- Do not use aliases, either in /etc/hosts or in configuring DNS.
If you are using DNS, storing this information in /etc/hosts is not required, but it is good practice.
- Make sure the /etc/sysconfig/network file on each system contains the hostname you have just set (or verified) for that system, for example myhost-1.
- Check that this system is consistently identified to the network:
- Run uname -a and check that the hostname matches the output of the hostname command.
- Run /sbin/ifconfig and note the value of inet
addr in the eth0 entry, for example:
$ /sbin/ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:A4:E8:97 inet addr:172.29.82.176 Bcast:172.29.87.255 Mask:255.255.248.0 ...
- Run host -v -t A `hostname` and make sure that hostname matches
the output of the hostname command, and has the
same IP address as reported by ifconfig for
eth0; for example:
$ host -v -t A `hostname` Trying "myhost.mynet.myco.com" ... ;; ANSWER SECTION: myhost.mynet.myco.com. 60 IN A 172.29.82.176
- For MRv1: make sure conf/core-site.xml and conf/mapred-site.xml, respectively, have the hostnames – not the IP addresses – of the NameNode and the JobTracker. These can be FQDNs (for example myhost-1.mynet.myco.com), or unqualified hostnames (for example myhost-1). See Customizing Configuration Files and Deploying MapReduce v1 (MRv1) on a Cluster.
- For YARN: make sure conf/core-site.xml and conf/yarn-site.xml, respectively, have the hostnames – not the IP addresses – of the NameNode, the ResourceManager, and the ResourceManager Scheduler. See Customizing Configuration Files and Deploying MapReduce v2 (YARN) on a Cluster.
- Make sure that components that depend on a client-server relationship – Oozie, HBase, ZooKeeper – are configured according to the instructions on their installation pages:
|<< Enabling NTP||Disabling SELinux >>|