Scanning the ESX host using Update Manager 4.x fails with the error: the host returns esxupdate error codes: 10
search cancel

Scanning the ESX host using Update Manager 4.x fails with the error: the host returns esxupdate error codes: 10

book

Article ID: 305996

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • Cannot scan the ESX host using Update Manager 4.x
  • Scanning the ESX host using Update Manager 4.x fails
  • You see the error:

    error: the host returns esxupdate error codes: 10

  • In the esxupdate.log file located on the ESX host at /var/log/vmware/, you see entries similar to:

    ERROR: esxupdate: An esxupdate error exception was hit:
    Traceback (most recent call last):
    File "/usr/sbin/esxupdate", line 243, in ?
    cmd.Run()
    File "/usr/lib/vmware/python2.4/site-packages/vmware/esx4update/cmdline.py
    line 449, in RUN
    metadata.Scan()
    File "/usr/lib/vmware/python2.4/site-packages/vmware/esx4update/VibCache.py
    line 219, in Scan
    raise errors.MetadataFormatError(None, msg)
    MetadataFormatError: (None, 'Failed scanning package data: rpmdb open failed


Environment

VMware ESX 4.0.x
VMware ESX 4.1.x

Cause

This issue occurs due to a corrupt RPM or inaccessible database.

Resolution

To resolve this issue, rebuild the RPM database (rpmdb) on the ESX host.
To rebuild the RPM database (rpmdb) on the ESX host:

  1. Connect to the ESX host using SSH. If you have issues connecting the host see, Unable to connect to an ESX host using Secure Shell (SSH) (1003807).
  2. Take a backup of the RPM database using these commands:

    mkdir /root/rpm_db_backup
    cp -p /var/lib/rpm/__db* /root/rpm_db_backup

  3. Run these commands to rebuild RPM database:

    rpm –rebuilddb
    rpm -qa

    Note: If rebuild operation fails with the error:

    rpmdb: Program version 4.3 doesn't match environment version
    error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
    error: cannot open Packages index using db3 - (-30974)

    Run this command to remove the existing rpmdb and then repeat Steps 2 and 3.

    rm /var/lib/rpm/__* && rpm -rebuilddb


Additional Information

Note: To enable SSH access for local user accounts created on ESX 4.1, see Local or Active Directory Domain users on ESX and ESXi 4.1 systems cannot log in (1024235).
Unable to connect to an ESX host using Secure Shell (SSH)
Local or Active Directory Domain users on ESX and ESXi 4.1 systems cannot log in