NwHost update failing with Thread died in Berkeley DB library error
Issue
While running yum clean all command, an error is thrown that the thread died in the Berkeley DB library.
[root@DECODER1 /]# yum clean all
rpmdb: Thread/process 11935/140166628886272 failed: <span style="color: #c0392b;">Thread died in Berkeley DB library</span>
error: db3 error(-30974) from dbenv->failchk: <span style="color: #c0392b;">DB_RUNRECOVERY: Fatal error, run database recovery</span>
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
rpmdb: Thread/process 11935/140166628886272 failed: <span style="color: #c0392b;">Thread died in Berkeley DB library</span>
error: db3 error(-30974) from dbenv->failchk: <span style="color: #c0392b;">DB_RUNRECOVERY: Fatal error, run database recovery</span>
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
In 11.x, The update fails with the below error.
/var/log/netwitness/config-management/chef-solo.log
---- Begin output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
STDOUT:
STDERR: error: rpmdb: BDB0113 Thread/process 30962/139665319159872 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
yum-dump General Error: Error: rpmdb open failed
---- End output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
Ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 returned 1
[2021-04-07T12:47:04+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
STDOUT:
STDERR: error: rpmdb: BDB0113 Thread/process 30962/139665319159872 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 - (-30973)
error: cannot open Packages database in /var/lib/rpm
yum-dump General Error: Error: rpmdb open failed
---- End output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
Ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.20.3/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 returned 1
[2021-04-07T12:47:04+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Cause
This error is caused by a corrupt RPM DB file under the /var/lib/rpm directory.
Resolution
To resolve the issue, move the RPM DB files from under /var/lib/rpm and rebuild the RPM db files.
mkdir -p /tmp/rpm-backup
cp -vf /var/lib/rpm/__db.* /tmp/rpm-backup
rm -vf /var/lib/rpm/__db.*
rpm --quiet -qa
rpm --rebuilddb
yum clean all
cp -vf /var/lib/rpm/__db.* /tmp/rpm-backup
rm -vf /var/lib/rpm/__db.*
rpm --quiet -qa
rpm --rebuilddb
yum clean all
Product Details
RSA Product Set: NetWitness PlatformRSA Product/Service Type: NetWitness Platform Core Appliances
RSA Version/Condition: 11.x, 10.6.x
Platform: CentOS 6/7
Summary
Update fails with RPM database error. This document outlines the procedure to fix errors.
Approval Reviewer Queue
RSA NetWitness Suite Approval Queue