- Pivotal Greenplum Database (GPDB) 4.3.x
- Operating System- Red Hat Enterprise Linux (RHEL) 6.x
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.
The objective is to avoid the interconnect and networking errors when running scripts like gpcheckcat, segments trying to grab a sequence, which uses entries in /etc/hosts.
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 a port is open, use the below command:
telnet <ip-address> <port-used-for-communication>
Below are typical errors seen when /etc/hosts are not configured properly