jueves, 9 de mayo de 2019

Error en rpmdb, solucion

rpmdb: Thread/process 32254/47320016639680 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error,
run database recovery
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed

La solucion es reconstruir la base de rpm, de esta manera:


[root@webdb1]# mkdir /var/lib/rpm/backup
[root@webdb1]# cp -a /var/lib/rpm/__db* /var/lib/rpm/backup/
[root@webdb1]# rm -f /var/lib/rpm/__db.[0-9][0-9]*
[root@webdb1]# rpm --quiet -qa
[root@webdb1]# rpm --rebuilddb
[root@webdb1]# yum clean all
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, security, subscription-manager This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Cleaning repos:
Cleaning up Everything
Uploading Enabled Repositories Report Loaded plugins: product-id
[root@webdb1]#

sábado, 4 de mayo de 2019

Semaphore ! - cannot create semaphore No space left on device


Me conecto al equipo, y chequeo los valores actuales

[root@lnx157 ~]# ipcs -sl

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

[root@lnx0157 ~]# sysctl kernel.sem
kernel.sem = 250 32000 32 128
[root@lnx0157 ~]#

Dependiendo si es red hat 6 o menor, hacer :

[root@lnx0157 ~]# echo kernel.sem = 250 64000 32 256 >>/etc/sysctl.conf
[root@lnx0157 ~]# sysctl -p
[root@lnx0157 ~]# sysctl kernel.sem
kernel.sem = 250 64000 32 256
[root@lnx0157 ~]#


Con el sysctl -p, relee el sysctlconf y toma los cambios, pero lo mejor es un reboot.

En el caso que sea un redhat 7, hay que hacer

echo kernel.sem = 250 64000 32 256 >/etc/sysctl.d/99-kernelsem.conf
sysctl --system
chequeo los valores con
sysctl kernel.sem ipcs -sl


A continuacion dejo unos valores de ejemplo para usar

kernel.sem = 250 64000 32 256
kernel.sem = 250 320000 32 1280
kernel.sem = 500 640000 32 1280
kernel.sem = 500 4096000 32 8192