It is essential that the hostnames of the hosts used in creating a cluster resolve correctly. Invalid hostname resolution is a very common source of configuration problems. Your Vertica database will not install or work properly unless the hostname resolution is correct.
Setting Up Cluster Hosts
This procedure sets up the minimal hostname resolution required for a Vertica installation.
On each host machine that will become part of the database cluster:
host01
, host02
, host03
, and host04
, the /etc/hosts file on each host should look like this:# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.13.128 host01
192.168.13.129 host02
192.168.13.130 host03
192.168.13.131 host04
Replace the example IP addresses shown here with the real ones. Do not remove the loopback address (127.0.0.1).
# /bin/hostname -f
localhost.localdomain
localhost.localdomain
is incorrect. In this case, you must set the hostname manually:
# /bin/hostname host01
# /bin/hostname -f
host01
# ping host01
PING host01 (192.168.13.128) 56(84) bytes of data.
64 bytes from host01 (192.168.13.128): icmp_seq=0 ttl=64 time=0.086 ms
Question for reviewers:
Also make changes to /etc/sysconfig/network?
What else can go wrong?
Setting the HOSTNAME Environment Variable
Some Linux installations require the HOSTNAME environment variable to be set correctly.
On each host machine that will become part of the database cluster:
export HOSTNAME=`hostname`
# echo $HOSTNAME
host01
If they do not match, change the value of HOSTNAME in /root/.profile
or /root/.bashrc
:
export HOSTNAME=`/bin/hostname -f`
Important Notes
Examples
In this example, the machines in the cluster are tristan, isolde and kurwenal. The Administration Tools are running on tristan.
# /bin/hostname -f tristan.brittany.com # ping tristan Pinging tristan [192.168.0.50] with 32 bytes of data: Reply from tristan.brittany.com: bytes=32 time<1ms TTL=128 |
Use the fully qualified domain name tristan.brittany.com in the cluster definition.
# ssh isolde hostname -f isolde # ping isolde Pinging isolde [192.168.0.51] with 32 bytes of data: Reply from isolde: bytes=32 time<1ms TTL=128 |
You can use the short hostname isolde in the cluster definition for convenience.
# ssh kurwenal hostname -f kurwenal # ping kurwenal Pinging kurwenal [192.168.0.52] with 32 bytes of data: Reply from 192.168.0.52: bytes=32 time<1ms TTL=128 |
The ping command output does not match the /bin/hostname -f output. Thus, the host machine kurwenal is not correctly configured and cannot be used in the cluster definition.