Saturday, October 16, 2021

[Solved]Jenkins won't listen on the port 8080 in the browser


The issue occurs when trying to install the jenkins on the Centos8 EC2 Instance in the AWS.

 # yum install jenkins -y


After successful installation and starting of the jenkins service and verifying from the 
netstat command still the jenkins installer will not open in the Browser. 


Install centos8 the firewalld is blocking the connection to the jenkins. So you have to specifically allow the ports in the centos8 separately to expose them else if you using the network firewalls like security group in the AWS Cloud you can simply disable the firewalld which will resolve your issue.


So in order to overcome this challenge simply disable the firewalld since the security groups are already doing this work for us

 # firewall --cmd --state 
 # systemctl stop firewalld 
 # systemctl status firewalld    
 # systemctl disable 
Restart the jenkins if required and that should solve your issue.

[Solved] DB_RUNRECOVERY: Fatal error, run database recovery


The issue occurs when trying to install the java-1.8.0-openjjdk-devel on the Centos8 EC2 Instance in the AWS.

 # yum install java-1.8.0-openjdk-devel -y
So this command took some time to run during which phase i thought it was struck and press the control+c to stop it.

When i try to run again it showed that there was pid running. 

So i killed the pid and when i tried to install again I got the following error.

error: rpmdb: BDB0113 Thread/process 3446/140301746613120 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


The error occured because when you run the command some changes were made in the rpmdb which got exited forcefully before the clean up cloud have occured due to which the rpmdb got corrupted. Once the Rpm db is corrupted you wont be able to use the yum or rpm to install packages. You need to recreate the rpmdb and install the changes again to fix the issue.


To recover this error you will have to recreate the rpm database by using the following commands which help you recover from the error above. So please follow the steps below to backup and rebuild the rpmdb database

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