To resolve this issue:
- Check if pgpass.conf is available under C:\Windows\System32\config\systemprofile\AppData\Roaming\postgresql.
- If pgpass.conf file is missing, recreate the file using below steps:
- Reset postgres password.
- Take a backup of pg_bha config file and edit pg_hbaconfig file under C:\ProgramData\VMware\vCenterServer\data\vpostgres.
- Change the md5 to trust (Since you cannot reset postgres password on vPostgres DB as you should connect to VCDB as vcuser which is not a super user)
# TYPE DATABASE USER ADDRESS METHOD
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
- Save and close the file.
- Stop and Start vPostgres service.
- Open command prompt as administrator.
- Go to C:\Program Files\VMware\vCenter Server\vPostgres\bin>
- Run psql -d VCDB -U postgres
- Once logged into DB, run the below command to update the password
ALTER USER postgres PASSWORD 'new_password';
Note: You can use the same password as vcpassword under vcbd.properties file : C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx
- Once the password is set, restore the backup file for pg_hba file and restart vPostgres service.
- Create a pgpass.conf file with below contents with updated password for postgres user and save the file to C:\Windows\System32\config\systemprofile\AppData\Roaming\postgresql and C:\Users\XXXX\AppData\Roaming\postgresql\
localhost:5432:postgres:postgres:NEWPASSWORD
127.0.0.1:5432:postgres:postgres:NEWPASSWORD
localhost:5432:VCDB:postgres:NEWPASSWORD
127.0.0.1:5432:VCDB:postgres:NEWPASSWORD
- Retry VC upgrade.