Error "could not open file “./pg_hba.conf.backup”: Permission denied" when deploying standby cell in VMware Cloud Director
search cancel

Error "could not open file “./pg_hba.conf.backup”: Permission denied" when deploying standby cell in VMware Cloud Director

book

Article ID: 405685

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • The standby cell configuration fails during deployment.
  • The /opt/vmware/var/log/vcd/configure-vcd.log displays the following error:

/opt/vmware/vpostgres/current/bin/pg_basebackup -1 "repmgr base backup" -D /var/vmware/vpostgres/current/pgdata -d '####-###### host-##.##.##.## gssencmode=disable' -X stream pg_basebackup: error: could not get COPY data stream: ERROR: could not open file "./pg_hba.conf.backup": Permission denied

pg_basebackup: removing contents of data directory "/var/vmware/vpostgres/current/pgdata"

ERROR: unable to take a base backup of the source server

Environment

VMware Cloud Director 10.x

Cause

When deploying a standby cell, the system replicates data from the primary cell's /var/vmware/vpostgres/current/pgdata directory. If any files in this directory lack read permissions, the deployment will fail with a "Permission Denied" error.

Resolution

To resolve this issue:

  1. Take snapshot of all the Cloud Director cells.
  2. SSH to the Primary cell.
  3. cd to the directory /var/vmware/vpostgres/current/pgdata
  4. Run the following commands:

chmod 755 pg_hba.conf.backup

chown postgres:users pg_hba.conf.backup

     5. Re-try standby cell deployment.