.
[bob@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 Sun 2022-03-13 11:53:07 UTC; 2min 49s ago
Process: 2234 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
Main PID: 2234 (code=exited, status=1/FAILURE)
[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
Any one faced same issue ? how to resolve it ?
Ayman
March 13, 2022, 12:08pm
#2
@Dheeraj1232
Thanks for reporting, we will check it ASAP.
Hello, @Dheeraj1232
As an update, One of our team members is working on it.
If you are interested to troubleshoot and fix that issues then please check the below thread -
@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 syste…
2 Likes
Yes I faced the same Error . checked the Network Service In Centos is down . Could not get it up because of not knowing the internal network Config .
IT HAS Worked !!! , Many Many Thanks for this help . So Very Nice of you @kishlay-raj .
Please post the commands you used , i am a new bee to jenkins
Hello @kumarmishra651
Commands are available in the Hint/Solution section.
Regards,
KodeKloud Support
1 Like
java version issue by default java comming with 1.8 but you need jdk11
sudo journalctl -xe -u jenkins
root@devsecops ~]# sudo journalctl -xe -u jenkins
– The result is failed.
Sep 23 19:12:35 devsecops jenkins[38205]: Sep 23, 2022 7:12:35 PM executable.Main verifyJavaVersion
Sep 23 19:12:35 devsecops jenkins[38205]: SEVERE: Running with Java class version 52, which is old>
Sep 23 19:12:35 devsecops jenkins[38205]: java.lang.UnsupportedClassVersionError: 52.0
Sep 23 19:12:35 devsecops jenkins[38205]: at executable.Main.verifyJavaVersion(Main.java:1>
Sep 23 19:12:35 devsecops jenkins[38205]: at executable.Main.main(Main.java:109)
Sep 23 19:12:35 devsecops jenkins[38205]: Jenkins requires Java versions [17, 11] but you are runn>
Sep 23 19:12:35 devsecops jenkins[38205]: java.lang.UnsupportedClassVersionError: 52.0
Sep 23 19:12:35 devsecops jenkins[38205]: at executable.Main.verifyJavaVersion(Main.java:1>
Sep 23 19:12:35 devsecops jenkins[38205]: at executable.Main.main(Main.java:109)
Sep 23 19:12:35 devsecops systemd[1]: Failed to start Jenkins Continuous Integration Server.
– Subject: Unit jenkins.service has failed
– Defined-By: systemd
– Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal
– Unit jenkins.service has failed.
– The result is failed.
Sep 23 19:12:35 devsecops systemd[1]: Failed to start Jenkins Continuous Integration Server.
– Subject: Unit jenkins.service has failed
– Defined-By: systemd
– Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal
– Unit jenkins.service has failed.
– The result is failed.
Hi @adepuajay ,
Thanks for sharing the tips.
If you are having this issue, just install java 11 instead of 1.8
sudo yum install java-11-openjdk-devel
2 Likes
What worked for me ( Install Jenkins on CentOS 8)
Remember: login using root
steps:
yum -y install java-11-openjdk-devel
java -version
sudo vi /etc/profile.d/java.sh
export JAVA_HOME=$(dirname $(dirname $(readlink $(readlink $(which javac)))))
export PATH=$PATH:$JAVA_HOME/bin
export JRE_HOME=/usr/lib/jvm/jre
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
source /etc/profile.d/java.sh
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum update
yum install jenkins -y
systemctl daemon-reload
systemctl start jenkins
systemctl status jenkins
1 Like
_ms12
September 17, 2024, 3:33am
#12
facing the same issue at the moment
After lots of research and looking through answers from KodeKloud community. I found solution which worked for me.
sudo yum -y install java-11-openjdk-devel
java -version
sudo wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
sudo yum update
sudo yum install jenkins -y
#Edit PORT no setting here
sudo systemctl edit --full jenkins
sudo systemctl enable jenkins
sudo systemctl start jenkins
I would like to thank @Tej-Singh-Rana @Sunil-Ror @mmkmou @Dickson-Victor and Google.