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

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

book

Article ID: 290210

calendar_today

Updated On:

Products

Carbon Black Cloud Endpoint Standard (formerly Cb Defense) Carbon Black Cloud Enterprise EDR (formerly Cb Threathunter)

Issue/Introduction

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.

Environment

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

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 Information

  • 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