Corrupt rpmdb
Hello, this started few days ago for the first time for as it seems for no reason.
[root@z ~]# yum update
error: rpmdb: BDB0113 Thread/process 2334084/140089513700224 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
Error: Error: rpmdb open failed
So I did this:
mkdir /var/lib/rpm/backup
cp -a /var/lib/rpm/__db* /var/lib/rpm/backup/
rm -f /var/lib/rpm/__db.[0-9][0-9]*
rpm --quiet -qa
rpm --rebuilddb
yum clean all
But when issuing the rpm--rebuilddb this error shows up (dont know if it matters or not)
error: could not delete old database at /var/lib/rpmold.196128
Ok, I then did 'yum clean all' and yum update works. Until the next day the same error starts to happen again and I need to rebuild the rpmdb.
Why is this happening and how can I fix this permanently? :/
Thank you.
-
Hey there! The RPM database isn't something that is controlled by cPanel, so if the normal processes don't work well you may need to reach out to your host to have them check the operating system. I would try running /scripts/find_and_fix_rpm_issues to see if that helps resolve the issue. This is equivalent to the "Rebuild RPM Database" option in the WHM interface. If that doesn't resolve the issue, you'll need to troubleshoot the OS itself. 0 -
Does it happen nightly with the cPanel updates? You can try checking /var/log/yum[.log] to see if perhaps its a specific package causing the problem. 0 -
Does it happen nightly with the cPanel updates? You can try checking /var/log/yum[.log] to see if perhaps its a specific package causing the problem.
That was my initial though that something was happening around the nightly updates. I have rebooted the server and I will check again tomorrow. Thank you for your help. :)0 -
I'm really stumped regarding this, this keeps happening. I dont have automatic updates enabled so Im not sure what could be doing this. :D 0 -
Were you able to determine if it happened as part of the nightly updates on the system? 0 -
Hi cPRex. Before this started to happen I upgraded the kernel via yum update. Everything went fine but few days later this rpmdb thing started to occur. Recently there was another kernel update and after that rpmdb is perfectly fine so I am thinking that some update, whether it was the kernel or another dependent package that was upgraded caused this problem. Thanks again for replying. :) 0 -
Glad to hear things are working well! 0
Please sign in to leave a comment.
Comments
7 comments