Installation of GPCC Fails with Non-gpadmin User on Greenplum 7
search cancel

Installation of GPCC Fails with Non-gpadmin User on Greenplum 7

book

Article ID: 437149

calendar_today

Updated On:

Products

VMware Tanzu Greenplum VMware Tanzu Greenplum / Gemfire VMware Tanzu Data Suite VMware Tanzu Data Suite VMware Tanzu Data

Issue/Introduction

When attempting to install GPCC in a Greenplum 7 environment using a non-standard administrator user (e.g., dbadmin instead of the default gpadmin), the installation script gpccinstall may fail to automatically configure the monitoring components.

Common issues(./gpccinstall error) include:

  • Failure to create the `gpmon` user.
INSTALLATION IN PROGRESS...
Using PwdLogin, connection Pguser is gpmon and Pghost is 127.0.0.1
Failed to connect to database as gpmon pq: role "gpmon" does not exist
  • Failure to create the `gpperfmon` database.
INSTALLATION IN PROGRESS...
Using PwdLogin, connection Pguser is gpmon and Pghost is 127.0.0.1
Failed to connect to database as gpmon pq: database "gpperfmon" does not exist
  • Errors related to `pg_hba.conf` authentication during the installation process.
INSTALLATION IN PROGRESS...
Using PwdLogin, connection Pguser is gpmon and Pghost is 127.0.0.1
Failed to connect to database as gpmon pq: no pg_hba.conf entry for host "127.0.0.1", user "gpmon", database "gpperfmon", SSL off

Environment

VMware Tanzu Greenplum 7.x + Greenplum Command Center 7.x

Cause

In Greenplum 7, the `gpccinstall` script is optimized for the default `gpadmin` environment. When using a different superuser (like `dbadmin`) to manage the database, the script may encounter unexpected error due the original code design.

Resolution

To successfully install GPCC using a non-standard administrator user, make sure the non-standard user has equivalent privilege as gpadmin, and manual preparation of the `gpperfmon` environment is required before running the installer. Follow these steps:

1. Update pg_hba.conf

Manually append the required entries to `$COORDINATOR_DATA_DIRECTORY/pg_hba.conf` to allow the `gpmon` user to connect.

# Append the following lines to pg_hba.conf
local   gpperfmon      gpmon   md5
host    all            gpmon   127.0.0.1/28    md5
host    all            gpmon   ::1/128         md5
host    all            gpmon   samenet         md5

Reload the configuration:

gpstop -u

2. Manually Create the gpmon Role

Create the `gpmon` superuser and set a password that complies with your organization's password policy (especially if `advanced_password_check` is enabled).

psql postgres -c "CREATE ROLE gpmon WITH SUPERUSER CREATEDB LOGIN ENCRYPTED PASSWORD 'your_strong_password';"

3. Manually Create the gpperfmon Database

createdb gpperfmon

4. Run the GPCC Installer

Execute the `gpccinstall` script using the `-W` flag to prompt for the `gpmon` password created in Step 2.

./gpccinstall-7.x.x -W
# When prompted: Password for GPDB user gpmon: [Enter Password]

5. Optional: Configure .pgpass

For seamless future access, add the credentials to the `~/.pgpass` file of the installation user:

*:<coordinator_port>:gpperfmon:gpmon:your_strong_password