Pivotal Knowledge Base

Follow

Best Practices for configuring /etc/hosts

Environment

Product Version
Pivotal Greenplum (GPDB) 4.3.x
OS RHEL 6.x

Purpose

This article explains setting up of /etc/hosts to prevent INTERCONNECT and NETWORK errors when running GPDB scripts that involve the communication between the Master and Segments and sometimes the Standby Master too.

Cause

The objective is to avoid the interconnect and networking errors when running scripts like gpcheckcat, segments trying to grab a sequence, which use entries in /etc/hosts. 

Procedure

While setting up a GPDB multinode cluster follow the best practices as shown below to create /etc/hosts

Find out the right interface that is open for communication. For example, if eth1 is the network interface configured, find out the IP on all of the hosts (master, segments and standby-master) by running /sbin/ifconfig eth1. Find out the hostname of the server using "hostname"

vi /etc/hosts on master host, every host needs to know who "mdw" is, so the alias in GPDB for master should always be mdw.

All segment hosts and standby master hosts and entries are mentioned below:

<eth1-ip-from-master> full-hostname mdw
<eth1-ip-from-segment1> full-hostname short-hostname
<eth1-ip-from-segment2> full-hostname short-hostname
<eth1-ip-from-segmentn> full-hostname short-hostname
<eth1-ip-from-standby-master> full-hostname short-hostname 

To find out if port is open use below command

telnet <ip-address> <port-used-for-communication>

Additional Information

Below are typical errors seen when /etc/hosts are not configured properly

Comments

Powered by Zendesk