IMPORTANT ANNOUNCEMENT: On May 6, 2024, Carbon Black User eXchange (UeX) and Case Management will move to a new platform!
The Community will be in read-only mode starting April 19th, 7:00 AM PDT. Check out the blog post!
You will still be able to use the case portal to create and interact with your support cases until the transition, view more information here!

Carbon Black Cloud: Sensor Installation Fails with Reference to RPM DB (Linux)

Carbon Black Cloud: Sensor Installation Fails with Reference to RPM DB (Linux)

Environment

  • Carbon Black Cloud Sensor: 2.9.2.x and Higher
  • Linux: All Supported Versions

Symptoms

Attempt to install Carbon Black Cloud Sensor on a Red Hat Linux-based host (RHEL, CentOS, Fedora) fails with "error: rpmdb" reference
# sudo ./install.sh '<CompanyRegistrationCode>'
1 Starting install of cbagentd at Tue Sep 14 06:12:51 UTC 2021.
2 error: rpmdb: ... Thread/process ... failed: ... Thread died in Berkeley DB library
3 error: db5 error(-30973) from dbenv->failchk: ... DB_RUNRECOVERY: Fatal error, run database recovery
4 error: cannot open Packages index using db5 - (-30973)
5 error: cannot open Packages database in /var/lib/rpm
...
Failed: agent installation failed.

Cause

RPM database corruption

Resolution

  1. Make backup directory
    mkdir /var/lib/rpm/backup
  2. Copy databases to backup directory
    cp -a /var/lib/rpm/__db* /var/lib/rpm/backup/
  3. Delete original databases
    rm -f /var/lib/rpm/__db.[0-9][0-9]*
  4. Query packages
    rpm --quiet -qa
  5. Rebuild databases
    rpm --rebuilddb
  6. Clean up all cached information
    yum clean all

Additional Notes

  • This can be a common scenario if the system shuts down or something else happens while an rpm command is running but is fairly easy to fix
  • Steps referenced came from CloudLinux KB

Related Content


Was this article helpful? Yes No
No ratings
Article Information
Author:
Creation Date:
‎09-30-2021
Views:
737
Contributors