gpinitstandby reports [WARNING]:-Could not start standby master
search cancel

gpinitstandby reports [WARNING]:-Could not start standby master

book

Article ID: 373241

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

When initialising the standby master with "gpinitstandby -s smdw", it reports warnings:

20240725:11:58:11:111145 gpinitstandby:mdw:gpadmin-[INFO]:-Checking if standby master is running on host: smdw in directory: /data/master/gpseg-1
20240725:11:58:12:111145 gpinitstandby:mdw:gpadmin-[WARNING]:-Unable to cleanup previously started standby: ''
20240725:12:00:56:111145 gpinitstandby:mdw:gpadmin-[WARNING]:-Could not start standby master
20240725:12:00:56:111145 gpinitstandby:mdw:gpadmin-[INFO]:-Cleaning up pg_hba.conf backup files...
20240725:12:00:57:111145 gpinitstandby:mdw:gpadmin-[INFO]:-Backup files of pg_hba.conf cleaned up successfully.

The gpinitstandby command exits without an error.

However the standby master has not been created correctly.

Checking the standby master with "gpstate -f" shows that the standby is not running.

Resolution

 

  • Log into the standby master host and check if the  $MASTER_DATA_DIRECTORY directory exists.

Notes:

    • Replace <smdw> with the hostname of the standby master
    • If the cluster is running Greenplum 7.x, use "$COORDINATOR_DATA_DIRECTORY" instead of "$MASTER_DATA_DIRECTORY"
ssh <smdw> "ls -ld $MASTER_DATA_DIRECTORY" 
  • If $MASTER_DATA_DIRECTORY directory exists on the standby master, check the $MASTER_DATA_DIRECTORY/pg_log/startup.log for errors.

  • Errors may include:
"FATAL","XX000","cgroup is not properly configured: can not find cgroup mount point (resgroup-ops-linux.c:1330)"
The cluster is using Resource Groups rather than Resource Queues. Check that the cgroups have been configured on the master and also the standby master hosts.
See Using Resource Groups for information on configuring cgroups.
"private key file "server.key" has group or world access"

Check that the permissions on the master host for the sepcified "server.key" file has permissions 0600 or less

  • Ensure that the user gpadmin can create files/directories in the parent directory of $MASTER_DATA_DIRECTORY.
  • Remove the standby master by running "gpinitstandby -r" on the master host
  • Re-try initialising the standby master.