Error: rpmdb open failed

Error: rpmdb open failed

Error: rpmdb open failed

The “rpmdb open failed” error message is mostly received when the rpm databases __db.00* located under /var/lib/rpm directory are corrupted. This results in a “error: cannot open Packages database” message while installation/updatation of a package via yum.

[/var/lib/rpm]# ls -l *db*
-rw-r–r– 1 root root 0 Jul 20 21:45 __db.000
-rw-r–r– 1 root root 24576 Aug 4 09:25 __db.001
-rw-r–r– 1 root root 1318912 Aug 4 09:25 __db.002
-rw-r–r– 1 root root 450560 Aug 4 09:25 __db.003

The common fix is to delete the rpm databases and run rebuilddb, like

yum clean all
rm -f /var/lib/rpm/__db*
rpm –rebuilddb
yum update

However, in case of a VPS, yum may still not work with rebuilding rpm database and you have to try create a /dev/urandom device. Login to your VPS and execute

rm /dev/urandom
mknod -m 644 /dev/urandom c 1 9

[/dev]# ls -ld urandom
cr–r–r– 1 root root 1, 9 Jul 19 10:27 urandom

To fix the problem permanently, login to Hardware Node and execute:

vzctl stop VEID
mknod –mode 644 /vz/private/VEID/fs/root/dev/urandom c 1 9
vzctl start VEID

Lowest numbered MX record points to local host

temporarily rejected RCPT : lowest numbered MX record points to local host

If you see the following in exim’s main_log: /var/log/exim_mainlog

This indicates that the domain doesn’t exist in /etc/localdomains. Edit the file with and ensure it’s listed there.

Please also ensure that it isn’t listed in /etc/remotedomains.

Specifying the nameserver’s DNS role in WHM

We need to specify which server is to function as a standalone server — that is, a server that only receives DNS data from the other servers in the cluster.

You do not need to link dedicated nameservers to each other.

Under Dns Role, select Standalone next to each web server’s hostname and IP. This will allow the nameserver to receive information from the web server, but not send data to it.

Setting a nameserver to synchronize data to a web server is not recommended, as it will create extraneous zones on the web server.

In most cases, a DNS-only server should never be set to synchronize to a Web server. The Web server should always be set to synchronize to the DNS ONLY server(s), and the DNS ONLY server(s) should always be set as standalone.

Disable Script Execution Using .htaccess

You can disable scripts being run in the directory of your choice by adding the following code to your .htaccess file in that directory

This would be particularly useful if you allow visitors to upload files to your server, but want to be sure that any potentially harmful files they upload are not allowed to execute.

AddHandler cgi-script .php .pl .jsp .asp .sh .cgi
Options -ExecCGI

You can replace the file types in the example with the file types you wish to disallow using .htaccess.

How to disable serversignature using .htaccess

To disable the server’s signature used to identify the server, use the following code in your .htaccess file:

ServerSignature Off

« Prev - Next »