Showing posts with label RPM. Show all posts
Showing posts with label RPM. Show all posts

July 17, 2020

Error: Rpmdb changed underneath us

Problem:

Ran into this error while attempting to apply a yum update on a CentOS 6 machine to update its kernel packages.
Error: Rpmdb changed underneath us 
The same scenario applies if you get this error as well:
error: can not open Packages database in /var/lib/rpm

Cause:

The problem has to do with corruption in the RPM database files under the /var/lib/rpm directory.

Solution:

  • Check for any processes that might be currently running and having a lock on the rpm database and kill them if they exist:
    • ps -aufx | grep /var/lib/rpm
  • Delete the temporary DB files:
    • rm -fv /var/lib/rpm/__*\
  • Rebuild your server RPM database using the below command:
    • rpm --rebuilddb -v -v

After completing these steps, attempt to run a "yum update" again and it most likely would work fine now. 
It worked for me.



Original Solution Post:
Share:

April 29, 2020

Postfix fails with (error: postdrop: warning: mail_queue_enter: create file maildrop/randomfilename.xxxxx: Permission denied)

Problem: Postfix delivery fails with error

(postdrop: warning: mail_queue_enter: create file maildrop/randomfilename.xxxxx: Permission denied)


** see note below

Cause:

/usr/sbin/postdrop has incorrect permissions. 
Correct the permissions for /usr/sbin/postdrop are as follows:
# ll /usr/sbin/postdrop

-rwxr-sr-x. 1 root postdrop 180808 Aug 23  2018 /usr/sbin/postdrop

Solution:

Fix permissions with the following:


rpm --setperms postfix
rpm --setugids postfix

In order to prepare for this next part, you need to make sure that you have the yum-plugin-verify.noarch installed from your standard CentOS or RedHat YUM repository.

You can figure out the default permissions for whatever file that maybe having a permissions issue on your Linux system.

To prepare for this task, you need to make sure that you have the yum plugin
by doing the following:
  • figure out which package provides the file you are troubleshooting.
    • On my CentOS 6 system, this can be accomplished by running the command 
    • rpm -q --whatprovides /usr/sbin/postdrop which will produce the following output indicating the package name that provided our postdrop file when it was installed:
      • postfix-2.6.6-8.el6.x86_64
    • Next step is to run the yum verify-all command against the package name to see the default ownership & permissions for its files as follows:
    • yum verify-all postfix-2.6.6-8.el6.x86_64 
    • The command above will produce something similar to the following output:

  • Just please not that this screenshot is not indicative of the problem at hand because the permissions issues were fixed. This screenshot part is only complaining about checksums & mtime values since this postfix install was updated and modified multiple times.

Share:

January 16, 2015

Header V3 RSA/SHA1 Signature, key ID BAD - Bug Resolved


For CentOS servers an update for the nss-softokn package was release today – nss-softokn-3.14.3-19However, nss-softokn-3.14.3-19 needs nss-softokn-freebl-3.14.3-19 to operate properly, and vice versa, but those packages do not have checks in place to make sure that a matching version of the other package are also installed.

Thus if you yum update only installed one of the packages you will end up with a broken YUM and RPM.

You might see error messages like these when trying to run YUM and RPM commands:

error: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID xxx BAD

error: rpmdbNextIterator: skipping h# 1784 Header V3 RSA/SHA1 Signature, key ID xxx BAD


Most of the time you will have had nss-softokn-3.14.3-19 installed but not nss-softokn-freebl-3.14.3-19

To fix this you have to:

1. Manually download nss-softokn-freebl-3.14.3-19


yumdownloader nss-softokn-freebl

or wget the RPMs

64-Bit servers / x86_64 run

wget ftp://195.220.108.108/linux/centos/6.6/updates/x86_64/Packages/nss-softokn-freebl-3.14.3-19.el6_6.x86_64.rpm

32-Bit Servers / i686 run

wget ftp://195.220.108.108/linux/centos/6.6/updates/i386/Packages/nss-softokn-freebl-3.14.3-19.el6_6.i686.rpm

Note: The FTP IP address above grabs the rpm package from an RPMFIND mirror in France, but you can get it from any other mirror that you usually use.

2. Extract the RPM

64-Bit servers / x86_64 run

rpm2cpio nss-softokn-freebl-3.14.3-19.el6_6.x86_64.rpm | cpio -idmv

32-Bit Servers / i686 run

rpm2cpio nss-softokn-freebl-3.14.3-19.el6_6.i686.rpm | cpio -idmv

3. Copy .libfreeblpriv3.* to correct location

64-Bit servers / x86_64 run

cp ./lib64/libfreeblpriv3.* /lib64

32-Bit Servers / i686 run

cp ./lib/libfreeblpriv3.* /lib


4. Rerun Yum Update to update nss-softokn-freebl and FIX YUM and RPM

yum update

-----------------------------------------------------------------------------------

Bug Report: https://bugzilla.redhat.com/show_bug.cgi?id=1182337


Share:

March 13, 2014

October 17, 2011