2

I have gotten an error when trying to deploy a package with yum:

2016-07-07 14:14:31,296 - ERROR - error: rpmdb: BDB0113 Thread/process     6723/140691298633536 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
CRITICAL:yum.main:

Error: rpmdb open failed

I can fix the problem by running:

rm -f /var/lib/rpm/__* && rpm --rebuilddb 
sudo yum-complete-transaction --cleanup-only

but the error is coming up again, seemingly intermittently. The os is CentOS Linux release 7.2.1511 (Core) and it is running in an Openstack kilo environment. /var/log/yum.log has no reference to the error. What could be the cause of this?

John Vandenberg
  • 474
  • 6
  • 16
user2644013
  • 192
  • 2
  • 14

3 Answers3

1

You may have failing memory/disk: there is no "db5" in rpm (it should be "db3"), and dbenv->failchk DB_RUNRECOVERY is called when a database is inconsistent. Check for hardware issues in /var/log/messages.

Jeff Johnson
  • 2,310
  • 13
  • 23
1

I had the same issue when I ran sudo yum update and I did the following after I understood that that was an issue related to the RPM database. it looks like the Berkeley DB library used by the RPM database caused that error, and was unable to recover from it.

  • sudo rm -f /var/lib/rpm/__db* - removes any potentially corrupted database files from the RPM database
  • sudo db_verify /var/lib/rpm/Packages - verifies the integrity of the remaining Packages file in the RPM database using the db_verify tool
  • sudo rpm --rebuilddb - rebuilds the RPM database from scratch using the RPM package manager
  • sudo yum clean all - removes any cached package data and metadata from the yum package manager
0

I had such a problem. It was/is a bug and this link will help you as helped me a lot: https://bugzilla.redhat.com/show_bug.cgi?id=1270528#c3

IAmAliYousefi
  • 1,132
  • 3
  • 21
  • 33