Unable to start Jenkins for Jenkins lab https://kodekloud.com/topic/lab-install-jenkins-on-a-vm/

Hi,
I’m working on this Jenkins lab activity Jenkins | KodeKloud
and following steps here Linux. But cannot start Jenkins and getting error below.

Installed:
jenkins.noarch 0:2.437-1.1

Complete!
[bob@centos-host ~]$ sudo systemctl enable jenkins
Created symlink from /etc/systemd/system/multi-user.target.wants/jenkins.service to /usr/lib/systemd/system/jenkins.service.
[bob@centos-host ~]$ sudo systemctl start jenkins
Job for jenkins.service failed because the control process exited with error code. See “systemctl status jenkins.service” and “journalctl -xe” for details.

Anything I’m missing here?

I just tried that lab and it is fine. Please refer to the solution tab for that question.

1 Like

Please check the java version ? make sure it should be above jdk-11*

hi @lharikrishna415 ,

I am also facing the same issue. I think this jenkins course has lot of issues with lab.

@Alistair_KodeKloud why is this issue occuring?

Regards,
Shylesh

Hi @Alistair_KodeKloud , I have been running into the same issue that is mentioned here since last month. I have been trying different possibilities, but still running into the same error.

Let me show you what is on the solution tab

sudo yum install epel-release -y
sudo yum install java-11-openjdk -y
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --no-check-certificate
sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
sudo yum install jenkins -y

Edit /lib/systemd/system/jenkins.service file and change Jenkins port to 8090 by updating Environment="JENKINS_PORT=" variable value.

sudo vi /lib/systemd/system/jenkins.service

Find the line
Environment="JENKINS_PORT=8080"
and change the value to 8090

Start jenkins

sudo systemctl start jenkins

image