"Precheck could not run successfully on the source vCenter Server. Check the upgrade logs on the source vCenter Server. Contact support." when attempting to perform a pre-Check on the vCenter Server.
search cancel

"Precheck could not run successfully on the source vCenter Server. Check the upgrade logs on the source vCenter Server. Contact support." when attempting to perform a pre-Check on the vCenter Server.

book

Article ID: 385991

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • On vCenter server 8.x, when attempting to perform a patch/upgrade pre-check from the "Updates" tab, it errors out with "Precheck could not run successfully on the source vCenter Server. Check the upgrade logs on the source vCenter Server. Contact support."

  •  In /var/log/vmware/applmgmt/applmgmt.log of the vCenter Server Appliance, you see below entries.

    [11451]DEBUG:vmware.appliance.update.update_functions:Running /usr/bin/unzip -o /storage/core/software-update/tmp/latest/target-patch-scripts.zip -d /storage/core/software-update/updates/8.0.3.00400
    [11451]DEBUG:vmware.appliance.update.update_b2b:Extracting installed package information
    [11451]ERROR:vmware.appliance.update.update_b2b:
    Got exception while trying discover at URL https://vapp-updates.vmware.com/vai-catalog/valm/vmw/8d167796-34d5-4899-be0a-6daade4005a3/8.0.3.00400.latest: error('rpmdb open failed') 'Traceback (most recent call last):\n  File "/usr/lib/applmgmt/update/py/vmware/appliance/update/update_b2b.py", line 2011, in processURLUpdates\n    header = _discoverUpdateAtUrl(url,\'latest\', enableListMajorUpgradeVersions)\n  File "/usr/lib/applmgmt/update/py/vmware/appliance/update/update_b2b.py", line 1886, in _discoverUpdateAtUrl\n    versionFolder, enableListMajorUpgradeVersions)\n  File "/usr/lib/applmgmt/update/py/vmware/appliance/update/update_b2b.py", line 1789, in _discoverUpdateAt\n    installedPkgs = _getInstalledPackages()\n  File "/usr/lib/applmgmt/update/py/vmware/appliance/update/update_b2b.py", line 483, in _getInstalledPackages\n    matchIter = transactionSet.dbMatch()\n_rpm.error: rpmdb open failed\n'
    [11451]ERROR:vmware.appliance.update.update_b2b:Got Exception during discover updates rpmdb open failed :
    [11451]DEBUG:vmware.appliance.update.update_pending:Got exception during listing updates rpmdb open failed

 

Environment

vCenter server 8.0.x

Cause

The RPM Database on vCenter Server Appliance is corrupt.

Resolution

Please follow the below steps to resolve this issue.

  • Take a snapshot of the vCenter Server Appliance. In case the vCenter is in linked mode, please take "OFFLINE" snapshots of all the vCenter servers in the SSO domain. Refer VMware vCenter in Enhanced Linked Mode pre-changes snapshot (online or offline) best practice

  • From the SSH of the affected vCenter Server Appliance, run the below commands to Rebuild the RPM database in the exact same sequence.

    1. rm -f /var/lib/rpm/__db*
    2. rpm -qa

  • Restart all the services on the vCenter server. 

Additional Information

vCenter 6.x and 7.x give the following error instead- "Error in method invocation rpmdb open failed".

Kb article for the same is- "Error in method invocation rpmdb open failed", error while updating vCenter Server Appliance 6.x/7.x