Jenkins installation failed

I am unable to start the jenkins after installation is completed . If i am trying to start i am getting below error :
Job for jenkins.service failed because a timeout was exceeded. See “systemctl status jenkins.service” and “journalctl -xe” for details.

Can anyone please help me out on this

Hi @BhargaviGodavarthi

If you are trying to install Jenkins on Ubuntu, you can refer to their official documentation for the prerequisites, mainly java version for installing Jenkins. Make sure you fulfill the requirements and then proceed with the installation steps provided there.

Regards.

Hi @Santosh_KodeKloud , I am trying to install Jenkins on Amazon linux Kernel Version 5.10, i have installed Java 17 version before jenkins installation . Even though getting the below error :
[root@ip-172-31-20-133 ~]# systemctl start jenkins
Job for jenkins.service failed because a timeout was exceeded. See “systemctl status jenkins.service” and “journalctl -xe” for details.

How are you trying to do the install? Please tell us a bit about that. If you’re using a binary, it’s likely that configuration for systemd is not part of that package. So are you doing that, or are you using an RPM via yum or dnf?

i am doing yum install jenkins -y after that i gave systemctl start jenkins

What do the logs tell you about Jenkins’ failed status?
journalctl -u jenkins

It came as below : - Logs begin at Mon 2024-10-07 19:16:42 UTC, end at Mon 2024-10-07 19:25:01 UTC. –
Oct 07 19:23:02 ip-172-31-34-231.ap-southeast-1.compute.internal systemd[1]: Starting Jenkins Continuous Integration Server…
Oct 07 19:23:02 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: Running from: /usr/share/java/jenkins.war
Oct 07 19:23:02 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:02.787+0000 [id=1] INFO winstone.Logger#logInt
Oct 07 19:23:04 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:04.462+0000 [id=1] WARNING o.e.j.s.handler.Con
Oct 07 19:23:05 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:05.584+0000 [id=1] INFO org.eclipse.jetty.serv
Oct 07 19:23:11 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:11.904+0000 [id=1] INFO o.e.j.w.StandardDescri
Oct 07 19:23:13 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:13.187+0000 [id=1] INFO o.e.j.s.s.DefaultSessi
Oct 07 19:23:22 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:22.707+0000 [id=1] INFO hudson.WebAppMain#cont
Oct 07 19:23:24 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:24.629+0000 [id=1] INFO o.e.j.s.handler.Contex
Oct 07 19:23:24 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:24.946+0000 [id=1] INFO o.e.j.server.AbstractC
Oct 07 19:23:25 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:25.341+0000 [id=1] INFO org.eclipse.jetty.serv
Oct 07 19:23:25 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:25.425+0000 [id=27] INFO winstone.Logger#logIn
Oct 07 19:23:29 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:29.826+0000 [id=32] INFO jenkins.InitReactorRu
Oct 07 19:23:29 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:29.990+0000 [id=33] INFO jenkins.InitReactorRu
Oct 07 19:23:46 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:46.784+0000 [id=32] INFO jenkins.InitReactorRu
Oct 07 19:23:46 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:46.863+0000 [id=33] INFO jenkins.InitReactorRu
Oct 07 19:23:46 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:46.946+0000 [id=33] INFO jenkins.InitReactorRu
Oct 07 19:23:51 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:51.107+0000 [id=33] INFO jenkins.InitReactorRu
Oct 07 19:23:51 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:51.260+0000 [id=32] INFO jenkins.InitReactorRu
Oct 07 19:23:51 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:51.261+0000 [id=32] INFO jenkins.InitReactorRu
Oct 07 19:23:51 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:51.262+0000 [id=32] INFO jenkins.InitReactorRu
Oct 07 19:23:51 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:23:51.822+0000 [id=48] INFO hudson.util.Retrier#s
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:24:00.781+0000 [id=32] INFO jenkins.install.Setup
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: *************************************************************
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: *************************************************************
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: *************************************************************
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: Jenkins initial setup is required. An admin user has been created and a passw
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: Please use the following password to proceed to installation:
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 197376da9ac04ac6a9c3bdd6de103de6
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: This may also be found at: /var/lib/jenkins/secrets/initialAdminPassword
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: *************************************************************
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: *************************************************************
Oct 07 19:24:00 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: *************************************************************
Oct 07 19:24:32 ip-172-31-34-231.ap-southeast-1.compute.internal systemd[1]: jenkins.service start operation timed out. Terminating.
Oct 07 19:24:32 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:24:32.301+0000 [id=28] INFO winstone.Logger#logIn
Oct 07 19:24:32 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:24:32.302+0000 [id=28] INFO org.eclipse.jetty.ser
Oct 07 19:24:32 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:24:32.304+0000 [id=28] INFO o.e.j.server.Abstract
Oct 07 19:24:32 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:24:32.382+0000 [id=28] INFO hudson.lifecycle.Life
Oct 07 19:24:32 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:24:32.386+0000 [id=28] INFO jenkins.model.Jenkins
Oct 07 19:24:33 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:24:33.021+0000 [id=28] INFO jenkins.model.Jenkins
Oct 07 19:24:33 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:24:33.021+0000 [id=28] INFO jenkins.model.Jenkins
Oct 07 19:24:33 ip-172-31-34-231.ap-southeast-1.compute.internal jenkins[4168]: 2024-10-07 19:24:33.027+0000 [id=28] INFO jenkins.model.Jenkins
lines 1-43

You say you’ve installed Java 17. Here’s what worked for me:

yum install java-17-amazon-corretto

I installed jenkins using the instructions from the Jenkins page for a LTS release on a RedHat flavored distribution.

This works. I opened up port 8080 on the security group for the instance; once I run systemctl start jenkins, jenkins is indeed running.

Hi @rob_kodekloud ,
yesterday i have given below command for java 17 installation : sudo yum install java-17-amazon-corretto -y
Rest all i have followed the same process as you did , but i got error . Now i have again tried by giving the command you mentioned it worked for me and i was able to start jenkins . Thank you so much .