Cette semaine, j’ai recu un mail de cron de l’un de mes serveurs.
Subject: Cron <root@SERVERNAME>
run-parts /etc/cron.weekly
/etc/cron.weekly/makewhatis.cron:
rpmdb: Lock table is out of available locker entries</strong>
rpmdb: Unknown locker ID: b4a0
error: db4 error(22) from db->close: Invalid argument
error: cannot open Pubkeys index using db3 - Cannot allocate memory (12)
..
Il y avait au moins plus de 100 erreurs dans ce mail…
Après une petite recherche sur google, je me suis rendu compte que le problème datait d’au moins 6 mois.
Voici la méthode pour réparer :
root# tar cvzf rpmdb-backup.tar.gz /var/lib/rpm
root# rm /var/lib/rpm/__db.00*
root# rpm --rebuilddb
root# rpm -qa | sort # pour vérifier que tout fonctionne
Après tout ca, je voulais vérifier que la tache cron fonctionnait.
root# sh /etc/cron.weekly/makewhatis.cron
Voilà !