Primary cell goes in failed status after rebooting in Cloud Director
search cancel

Primary cell goes in failed status after rebooting in Cloud Director

book

Article ID: 371382

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • VCD and vpostgres services fail to start on the Primary cell 
  • None of the Tenant are able to access Cloud Director Portal
  • Cell-runtime.logs shows a postgres exception: 
    "org.postgresql.util.PSQLException: Connection to xx.xxx.x.xx:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections."
  • postgres database logs shows the error :
    FATAL:  could not load pg_hba.conf
    LOG:  database system is shut down

Environment

VMware Cloud Director

Cause

 

The issue because IP addresses added in the "IPv4 local connections" section in the pg_hba.conf file do not have a valid subnet and causing postgres to shutdown and going in failed status.

Resolution

To help solving the issue, you will need to make sure that the ip addresses placed in he pg_hba.conf file contain an IP address with a valid subnet.

For example, checking the file /var/vmware/vpostgres/current/pgdata/pg_hba.conf you will see entries where the /32 subnet is missing:
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
host    all             all             <IP_ADDRESS_1>/32       md5
host    all             all             <IP_ADDRESS_2>          md5  < missing subnet
host    all             all             <IP_ADDRESS_3>          md5  < missing subnet

edit the pg_hba.conf file and add the /32 subnet:

# IPv4 local connections:
host    all             all             127.0.0.1/32           md5
host    all             all             <IP_ADDRESS_1>/32      md5
host    all             all             <IP_ADDRESS_2>/32      md5
host    all             all             <IP_ADDRESS_3>/32      md5

You will then need to create a text file placed in the folder /opt/vmware/appliance/etc/pg_hba.d/ and containing the correct IPv4 local connection.

After that reboot the cell to apply the changes.

 

 

Additional Information

To refer to the document which explain that you can add External IP addresses:  Configure External Access to the VMware Cloud Director Database