Hello Community

Hello Community,

I have installed Jenkins in Centos but when I start it I am facing the below error

[root@centos-host ~]# systemctl status jenkins.service
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2022-05-13 09:33:35 UTC; 9s ago
Process: 21376 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
Main PID: 21376 (code=exited, status=1/FAILURE)

May 13 09:33:35 centos-host systemd[1]: Failed to start Jenkins Continuous Integration Server.
May 13 09:33:35 centos-host systemd[1]: Unit jenkins.service entered failed state.
May 13 09:33:35 centos-host systemd[1]: jenkins.service failed.
May 13 09:33:35 centos-host systemd[1]: jenkins.service holdoff time over, scheduling restart.
May 13 09:33:35 centos-host systemd[1]: Stopped Jenkins Continuous Integration Server.
May 13 09:33:35 centos-host systemd[1]: start request repeated too quickly for jenkins.service
May 13 09:33:35 centos-host systemd[1]: Failed to start Jenkins Continuous Integration Server.
May 13 09:33:35 centos-host systemd[1]: Unit jenkins.service entered failed state.
May 13 09:33:35 centos-host systemd[1]: jenkins.service failed.

Can anyone help?

Hi @Saikumar-Reddy-Chall ,
Where are you installing the Jenkins?
and please share the logs from the below command:-

journalctl -xe -u jenkins

Regards,

Hello Tej,

I am trying to install Jenkins on Centos which is part of Jenkins LAB modules where we need to install Jenkins and change its default port to 8090.I have followed the below comment posted by you and the issue is fixed thank you…!

@kishlay-raj In case, If you wanna troubleshoot and fix this issue please follow the below instructions - sudo journalctl -xe -u jenkins You will see the error that it’s happening due to a failed to bind port. sudo systemctl status jenkins you will see the unit file of this jenkins. sudo vi /usr/lib/systemd/system/jenkins.service change the JENKINS_PORT=“8080” to “8090” then reload the daemon because we made some changes in the unit files and then restart the jenkins service. sudo systemctl start jenkins.

I would like to bring one more issue to your attention while installing jenkins we are facing a certificate issue.

ERROR: cannot verify pkg.jenkins.io’s certificate, issued by ‘/C=US/O=Let’s Encrypt/CN=R3’: Issued certificate has expired.

To remediate this I have installed certificates again with help of below command.

sudo yum install -y ca-certificates

Post the jenkins installation was successful. is the above remediation recommended or is there any other alternative?

Thank you,
Saikumar

Hi @Saikumar-Reddy-Chall ,
That’s odd. Let me check that.

Regards,

I followed the steps from the Solution and it’s working as expected.
and I also inspected the mentioned package and it’s already there on the server.

I tried from the official docs and we have to use the “--no-check-certificate” option to make it work.
Please find the attached screenshot.

Regards,
KodeKloud Support

Hello Tej-Singh,

Thank you for your responses, I will make a note of it and work accordingly…!!

Thank you,
Saikumar

Hi Tej,

I am running the below command from the solution itself, but getting the following error. Please help me to start the jenkins.

$ sudo systemctl start jenkins

Job for jenkins.service failed. See “systemctl status jenkins.service” and “journalctl -xe” for details.

Hi @Sandesh-D-Manocharya ,
Can you please follow the instructions from the below thread?

Hi @Tej-Singh-Rana ,
I tried the instructions from that thread. But I got below errors as shown in the screenshot.

[bob@centos-host ~]$ sudo systemctl -l status jenkins
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; disabled; vendor preset: disabled)
Active: inactive (dead)

Sep 21 12:30:15 centos-host jenkins[32903]: at executable.Main.main(Main.java:109)
Sep 21 12:33:12 centos-host jenkins[33122]: Sep 21, 2022 12:33:12 PM executable.Main verifyJavaVersion
Sep 21 12:33:12 centos-host jenkins[33122]: SEVERE: Running with Java class version 52, which is older than the Minimum required version 55. See https://jenkins.io/redirect/java-support/
Sep 21 12:33:12 centos-host jenkins[33122]: java.lang.UnsupportedClassVersionError: 52.0
Sep 21 12:33:12 centos-host jenkins[33122]: at executable.Main.verifyJavaVersion(Main.java:145)
Sep 21 12:33:12 centos-host jenkins[33122]: at executable.Main.main(Main.java:109)
Sep 21 12:33:12 centos-host jenkins[33122]: Jenkins requires Java versions [17, 11] but you are running with Java 1.8 from /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.342.b07-1.el7_9.x86_64/jre
Sep 21 12:33:12 centos-host jenkins[33122]: java.lang.UnsupportedClassVersionError: 52.0
Sep 21 12:33:12 centos-host jenkins[33122]: at executable.Main.verifyJavaVersion(Main.java:145)
Sep 21 12:33:12 centos-host jenkins[33122]: at executable.Main.main(Main.java:109)
[bob@centos-host ~]$

Hi @Sandesh-D-Manocharya,
I found the issue, it’s happening because of Java version.
The current command - sudo yum install java -y installing the Java 8 and we need Java 11.
So please use the below command to install Java 11.

sudo yum install java-11-openjdk -y

Reference link: -
Jenkins requires Java 11 or newer

Btw I updated the solution also.

Regards,

1 Like

thanks, that was my problem