GPCC installation fails with connection refused after RHEL 8 upgrade
search cancel

GPCC installation fails with connection refused after RHEL 8 upgrade

book

Article ID: 445747

calendar_today

Updated On:

Products

VMware Tanzu Greenplum VMware Tanzu Greenplum / Gemfire

Issue/Introduction

When attempting to install Greenplum Command Center (GPCC) on a server recently upgraded to RHEL 8, the ./gpccinstall script fails with the following error:

Failed to connect to database postgres on 127.0.0.1:5432 as gpadmin: dial tcp 127.0.0.1:5432: connect: connection refused

This occurs even if the Greenplum Database (GPDB) software has been successfully installed and segment recovery (gprecoverseg) has completed without issue.

Environment

Greenplum Command Center 6.13.1

Cause

The error indicates that the GPCC installer cannot establish a network connection to the Greenplum coordinator (master) database on the local loopback address. Common causes include:

  1. Database Not Running: The Greenplum Database instance is not currently started.
  2. HBA Restrictions: The pg_hba.conf file is not configured to allow the gpadmin user to connect via the 127.0.0.1 interface.
  3. Port Mismatch: The database is listening on a port other than the default 5432, or the installer is not picking up the PGPORT environment variable.
  4. OS/Network Security: RHEL 8 firewalld or SELinux settings may be blocking local loopback traffic (though less common for 127.0.0.1).

Resolution

1. Verify Greenplum Database Status

Ensure the database is active and the coordinator is running.

gpstate -s

If the status is not "Active," start the database:

gpstart -a

2. Validate Local Connectivity

Confirm the database is listening on port 5432 and the local IP:

netstat -an | grep 5432

You should see a listener on 127.0.0.1:5432 or 0.0.0.0:5432.

3. Update pg_hba.conf

The installer must connect to the postgres database. Ensure the pg_hba.conf file (located in the $MASTER_DATA_DIRECTORY) contains an entry for local connections.

Add or verify the following line exists:

# TYPE  DATABASE    USER    ADDRESS         METHODhost    postgres    gpadmin 127.0.0.1/32    trust

If you modify the file, reload the configuration:

gpstop -u

4. Check Environment Variables

Confirm that the gpadmin user has the correct environment sourced for the RHEL 8 installation:

source /usr/local/greenplum-db/greenplum_path.shecho $MASTER_DATA_DIRECTORYecho $PGPORT

5. Manual Connection Test

Before running the installer again, verify you can connect manually via psql:

psql -h 127.0.0.1 -p 5432 -d postgres

If this connection fails with "connection refused," troubleshoot the database startup logs in pg_log.

6. Rerun GPCC Installer

Once manual connectivity is confirmed, execute the installer:

./gpccinstall-<version>