job for jenkins.service failed because the control process exited with error code.
Mohammed
Guys, does anyone know the answer?
get job for jenkins.service failed because the control process exited with error code. from screen.
While installing Jenkins on VM getting below error
. [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: fa…
KodeKloud provides online hands-on trainings on trending Cloud and DevOps technologies like Docker, Kubernetes, OpenShift, Ansible, Puppet, Chef, Linux and more. This community is built to ask questions about these technologies, get support for our labs, mock exams and help each other.
The first paragraph of this pinned topic will be visible as a welcome message to all new visitors on your homepage. It’s important!
This community is for any one learning at KodeKloud Learn-by-doing Platform
Dive into discussions about DevOps technologies
Feel free to ask any questions you may have while going through our courses and get your doubts cleared.
Visit all courses at http://www.kodekloud.com
0
While installing Jenkins on VM getting below error
Jenkins Dheeraj1232 Mar 13 .
[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 ?
created
Mar 13
last reply
Sep 24 8
replies
4.3k
views
7
users
3
likes
1
link
Ayman Mar 13 @Dheeraj1232
Thanks for reporting, we will check it ASAP.
Tej_Singh_Rana Mar 14 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 -
Installing jenkins, lab: install jenkins on a vm
Jenkins
@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…
korakdas.das Mar 15
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 .
korakdas.das Mar 15
Installing jenkins, lab: install jenkins on a vm
sudo systemctl status jenkins
IT HAS Worked !!! , Many Many Thanks for this help . So Very Nice of you @kishlay-raj .
11 DAYS LATER kumarmishra651 Mar 27
Please post the commands you used , i am a new bee to jenkins
Tej_Singh_Rana Mar 28
Hello @kumarmishra651
Commands are available in the Hint/Solution section.
Regards, KodeKloud Support 6 MONTHS LATER adepuajay Sep 23
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 7
– 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 7
– Unit jenkins.service has failed.
– The result is failed.
Tej-Singh-Rana Sep 24 Hi @adepuajay,
Thanks for sharing the tips.
Suggested Topics
Topic Replies Activity
Exploring JenkinsUI Lab - Que9
Jenkins Aug 18 PAM Integration Jenkins Jun 16
Why this is asking finger print
Jenkins May 17
Git Repo not setup in final lab
Jenkins Jun 2
Jenkins fails when running "service start jenkins"
I installed jenkins on Centos 7 using the following: sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import http://pkg.jenkins.io/redhat-stable/
Jenkins fails when running "service start jenkins"
Ask Question
Asked 6 years, 2 months ago
Modified 17 days ago
Viewed 208k times 55
I installed jenkins on Centos 7 using the following:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum install jenkins
as described on the official documentation
However when I run:
service start jenkins
I get the following error message:
Starting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
[FAILED]
Running systemctl status jenkins.service gives me this:
● jenkins.service - LSB: Jenkins Continuous Integration Server
Loaded: loaded (/etc/rc.d/init.d/jenkins)
Active: failed (Result: exit-code) since Wed 2016-09-21 16:45:28 BST; 3min 59s ago
Docs: man:systemd-sysv-generator(8)
Process: 2818 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.JavaVMArguments.of(JavaVMArguments...04)
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.JavaVMArguments.current(JavaVMArgu...92)
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.Daemon.daemonize(Daemon.java:106)
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.Daemon.all(Daemon.java:88)
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: ... 6 more
Sep 21 16:45:28 webstack.local.caplib systemd[1]: jenkins.service: control process exited, code=exited s...s=1
Sep 21 16:45:28 webstack.local.caplib systemd[1]: Failed to start LSB: Jenkins Continuous Integration Server.
Sep 21 16:45:28 webstack.local.caplib systemd[1]: Unit jenkins.service entered failed state.
Sep 21 16:45:28 webstack.local.caplib systemd[1]: jenkins.service failed.
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: [FAILED]
Hint: Some lines were ellipsized, use -l to show in full.
and running journalctl -xe gives me this:
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.Daemon.daemonize(Daemon.java:106)
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: at com.sun.akuma.Daemon.all(Daemon.java:88)
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: ... 6 more
Sep 21 16:45:28 webstack.local.caplib runuser[2819]: pam_unix(runuser:session): session closed for user jenkin
Sep 21 16:45:28 webstack.local.caplib systemd[1]: jenkins.service: control process exited, code=exited status=
Sep 21 16:45:28 webstack.local.caplib systemd[1]: Failed to start LSB: Jenkins Continuous Integration Server.
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit jenkins.service has failed.
--
-- The result is failed.
Sep 21 16:45:28 webstack.local.caplib systemd[1]: Unit jenkins.service entered failed state.
Sep 21 16:45:28 webstack.local.caplib systemd[1]: jenkins.service failed.
Sep 21 16:45:28 webstack.local.caplib jenkins[2818]: [FAILED]
Sep 21 16:45:28 webstack.local.caplib polkitd[1392]: Unregistered Authentication Agent for unix-process:2813:8
Sep 21 16:45:28 webstack.local.caplib dhclient[1390]: DHCPREQUEST on eno16777984 to 192.168.15.254 port 67 (xi
Sep 21 16:45:28 webstack.local.caplib dhclient[1390]: DHCPACK from 192.168.15.254 (xid=0x2ab6e6bc)
Sep 21 16:45:30 webstack.local.caplib dhclient[1390]: bound to 192.168.15.120 -- renewal in 865 seconds.
Sep 21 16:45:36 webstack.local.caplib systemd[1]: Starting Cleanup of Temporary Directories...
-- Subject: Unit systemd-tmpfiles-clean.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-tmpfiles-clean.service has begun starting up.
Sep 21 16:45:36 webstack.local.caplib systemd[1]: Started Cleanup of Temporary Directories.
-- Subject: Unit systemd-tmpfiles-clean.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit systemd-tmpfiles-clean.service has finished starting up.
--
-- The start-up result is done.
Both of which is really unhelpful. How do I fix this issue?
jenkins Share
Improve this question
edited Feb 22, 2021 at 6:58
Krishnadas PC 5,4312 2 gold badges 48 48 silver badges 46 46 bronze badges
asked Sep 21, 2016 at 15:52
Yahya Uddin 24.5k32 32 gold badges 127 127 silver badges 222 222 bronze badges 3
You can check for any error messages in /var/log/jenkins/jenkins.log. –
Amit
Sep 21, 2016 at 17:10
2
I believe no such file existed –
Yahya Uddin
Sep 21, 2016 at 17:15
Job for jenkins.service failed because a timeout was exceeded
I have installed OpenJDK-11-JRE root@admincp:~# java -version openjdk version "11.0.15" 2022-04-19 OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1) OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu…
Job for jenkins.service failed because a timeout was exceeded
Using JenkinsAsk a question
question uiisoft May 17
I have installed OpenJDK-11-JREroot@admincp:~# java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)
The following error occurred in installing Jenkinsroot@admincp:~# apt install -y jenkins
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
liblockfile-bin liblockfile1 lockfile-progs sendmail-base sensible-mda
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
jenkins
0 upgraded, 1 newly installed, 0 to remove and 107 not upgraded.
Need to get 0 B/91.4 MB of archives.
After this operation, 95.0 MB of additional disk space will be used.
Selecting previously unselected package jenkins.
(Reading database ... 290346 files and directories currently installed.)
Preparing to unpack .../jenkins_2.332.3_all.deb ...
Unpacking jenkins (2.332.3) ...
Setting up jenkins (2.332.3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/jenkins.service → /lib/systemd/system/jenkins.service.
Job for jenkins.service failed because a timeout was exceeded.
See "systemctl status jenkins.service" and "journalctl -xe" for details.
invoke-rc.d: initscript jenkins, action "start" failed.
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: timeout) since Tue 2022-05-17 15:31:19 CST; 9ms ago
Process: 105107 ExecStart=/usr/bin/jenkins (code=exited, status=143)
Main PID: 105107 (code=exited, status=143)
Status: "Jenkins stopped"
dpkg: error processing package jenkins (--configure):
installed jenkins package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (245.4-4ubuntu3.15) ...
Errors were encountered while processing:
jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@admincp:~# systemctl status jenkins.service
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
Active: activating (start) since Tue 2022-05-17 15:32:50 CST; 25s ago
Main PID: 106321 (java)
Tasks: 119 (limit: 76486)
Memory: 355.7M
CGroup: /system.slice/jenkins.service
└─106321 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
5月 17 15:32:53 admincp jenkins[106321]: *************************************************************
5月 17 15:32:53 admincp jenkins[106321]: *************************************************************
5月 17 15:32:53 admincp jenkins[106321]: *************************************************************
5月 17 15:32:53 admincp jenkins[106321]: Jenkins initial setup is required. An admin user has been created and a password generated.
5月 17 15:32:53 admincp jenkins[106321]: Please use the following password to proceed to installation:
5月 17 15:32:53 admincp jenkins[106321]: b6c6ff7cfcbb498293d4646b732cd51a
5月 17 15:32:53 admincp jenkins[106321]: This may also be found at: /var/lib/jenkins/secrets/initialAdminPassword
5月 17 15:32:53 admincp jenkins[106321]: *************************************************************
5月 17 15:32:53 admincp jenkins[106321]: *************************************************************
5月 17 15:32:53 admincp jenkins[106321]: *************************************************************
root@admincp:~# journalctl -xe
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit jenkins.service has begun execution.
--
-- The job identifier is 24920.
5月 17 15:32:50 admincp jenkins[106321]: Running from: /usr/share/java/jenkins.war
5月 17 15:32:50 admincp jenkins[106321]: 2022-05-17 07:32:50.838+0000 [id=1] INFO org.eclipse.jetty.util.log.Log#initialized: Logging initialized @315ms to org.eclipse.jetty.util.log.JavaUtilLog
5月 17 15:32:50 admincp jenkins[106321]: 2022-05-17 07:32:50.907+0000 [id=1] INFO winstone.Logger#logInternal: Beginning extraction from war file
5月 17 15:32:50 admincp jenkins[106321]: 2022-05-17 07:32:50.927+0000 [id=1] WARNING o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
5月 17 15:32:50 admincp jenkins[106321]: 2022-05-17 07:32:50.980+0000 [id=1] INFO org.eclipse.jetty.server.Server#doStart: jetty-9.4.43.v20210629; built: 2021-06-30T11:07:22.254Z; git: 526006ecfa3af7f1a27ef3a288e2bef7ea9dd7>
5月 17 15:32:51 admincp jenkins[106321]: 2022-05-17 07:32:51.233+0000 [id=1] INFO o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
5月 17 15:32:51 admincp jenkins[106321]: 2022-05-17 07:32:51.265+0000 [id=1] INFO o.e.j.s.s.DefaultSessionIdManager#doStart: DefaultSessionIdManager workerName=node0
Guys, does anyone know the answer?