Upgrade fails with, Error during pre-patch VCDB. See vcdb_patch.err.
search cancel

Upgrade fails with, Error during pre-patch VCDB. See vcdb_patch.err.

book

Article ID: 376109

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

While patching the vCenter, the upgrade fails with the following error:

Error             Error during pre-patch VCDB. See vcdb_patch.err.
                
Resolution   pre-patch DB has failed. Please check vcdb_patch.log

 

Checking /var/log/vmware/applmgmt/vcdb_pre_patch.err shows the following errors:

WARNING: password file "/root/.pgpass" has group or world access; permissions should be u=rw (0600) or less
WARNING: password file "/root/.pgpass" has group or world access; permissions should be u=rw (0600) or less
WARNING: password file "/root/.pgpass" has group or world access; permissions should be u=rw (0600) or less
WARNING: password file "/root/.pgpass" has group or world access; permissions should be u=rw (0600) or less

 

From the PatchRunner logs:

YYYY-MM-DD HH:MM:SS,XXXZ vcIntegrity:CollectRequirements ERROR vcIntegrity Failed to query hosts for precheck using psql.
Error: WARNING: password file "/root/.pgpass" has group or world access; permissions should be u=rw (0600) or less
Password for user postgres:
WARNING: password file "/root/.pgpass" has group or world access; permissions should be u=rw (0600) or less
psql.bin: error: fe_sendauth: no password supplied

Cause

This is caused by the permissions on the /root/.pgpass file. The permissions for this file must be set to 600. If it has a higher level, the upgrade will fail.

The permissions of postgresql password file /root/.pgass must disallow any access to world or group. If the permissions are less strict than this, the file will be ignored. That's why we can see the error like 'no password supplied'.

Resolution

In order to resolve this issue, log into the vCenter via SSH and run the following command:

# chmod 600 /root/.pgpass

Restart Services on the vCenter and run the upgrade again.