Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details

Jenkins setup:
I am getting the below error during jenkins setup

Job for jenkins.service failed because the control process exited with error code. See “systemctl status jenkins.service” and “journalctl -xe” for details …

[root@jenkintask yum.repos.d]# sudo systemctl status jenkins

[root@Jenkins ~]# sudo yum install jenkins
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.6 kB 00:00:00
Package jenkins-2.447-1.1.noarch already installed and latest version
Nothing to do
[root@Jenkins ~]# sudo dervice jenkins start
sudo: dervice: command not found
[root@Jenkins ~]# sudo service jenkins start
Redirecting to /bin/systemctl start jenkins.service
Job for jenkins.service failed because the control process exited with error code. See “systemctl status jenkins.service” and “journalctl -xe” for details …

[root@jenk yum.repos.d]# sudo yum install jenkins
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd

File contains no section headers.
file: file:///etc/yum.repos.d/jenkins.repo, line: 1
‘–2024-03-03 08:50:02-- https://pkg.jenkins.io/redhat-stable/jenkins.repo\n


I removed jenkins.repo and reconnected to the jenkins.repo

i used the below commands

// [root@jenk yum.repos.d]# sudo rm -r jenkins.repo (to remove jenkins.repo)
// [root@jenk yum.repos.d]# sudo systemctl stop jenkins (to stop jenkins service)

[root@jenk yum.repos.d]# ls
amzn2-core.repo  amzn2-extras.repo

 [root@jenk yum.repos.d]# sudo wget -O /etc/yum.repos.d/jenkins.repo \
>     https://pkg.jenkins.io/redhat-stable/jenkins.repo
[root@jenk yum.repos.d]# sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key

[root@jenk yum.repos.d]# ls

amzn2-core.repo amzn2-extras.repo jenkins.repo

[root@jenk yum.repos.d]# sudo yum upgrade

[root@jenk yum.repos.d]# yum install java -y

[root@jenk yum.repos.d]# sudo yum install jenkins.noarch

[root@jenk yum.repos.d]# sudo yum install jenkins.noarch

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
→ Running transaction check
—> Package jenkins.noarch 0:2.440.1-1.1 will be installed
→ Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================================
Package Arch Version Repository Size

Installing:
jenkins noarch 2.440.1-1.1 jenkins 82 M

Transaction Summary

Install 1 Package

Total download size: 82 M
Installed size: 83 M
Is this ok [y/d/N]: y
Downloading packages:
jenkins-2.440.1-1.1.noarch.rpm | 82 MB 00:00:26
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : jenkins-2.440.1-1.1.noarch 1/1
Verifying : jenkins-2.440.1-1.1.noarch 1/1

Installed:
jenkins.noarch 0:2.440.1-1.1

Complete!

[root@jenk yum.repos.d]# sudo systemctl daemon-reload

[root@jenk yum.repos.d]# sudo systemctl enable jenkins.service

Created symlink from /etc/systemd/system/multi-user.target.wants/jenkins.service to /usr/lib/systemd/system/jenkins.service.

[root@jenk yum.repos.d]# sudo systemctl start jenkins

Hello and welcome to this community, @pradee2604. :wave:

What do the journalctl log say now?

1 Like

I am unable to find log details.

1 Like
[ec2-user@jenk ~]$ journalctl -u jenkins.service
-- Logs begin at Sun 2024-03-03 08:03:19 UTC, end at Tue 2024-03-05 05:24:10 UTC. --
Mar 03 16:19:14 jenk systemd[1]: Starting Jenkins Continuous Integration Server...
Mar 03 16:19:14 jenk jenkins[31396]: Running from: /usr/share/java/jenkins.war
Mar 03 16:19:15 jenk jenkins[31396]: 2024-03-03 16:19:15.499+0000 [id=1]        INFO        winstone.Logger#logInternal: Beginning extraction from war file
Mar 03 16:19:17 jenk jenkins[31396]: 2024-03-03 16:19:17.145+0000 [id=1]        WARNING        o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath
Mar 03 16:19:17 jenk jenkins[31396]: 2024-03-03 16:19:17.310+0000 [id=1]        INFO        org.eclipse.jetty.server.Server#doStart: jetty-10.0.18; built: 2023-10-27T01:59:58.245Z;
Mar 03 16:19:18 jenk jenkins[31396]: 2024-03-03 16:19:18.054+0000 [id=1]        INFO        o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org
Mar 03 16:19:18 jenk jenkins[31396]: 2024-03-03 16:19:18.179+0000 [id=1]        INFO        o.e.j.s.s.DefaultSessionIdManager#doStart: Session workerName=node0
Mar 03 16:19:19 jenk jenkins[31396]: 2024-03-03 16:19:19.729+0000 [id=1]        INFO        hudson.WebAppMain#contextInitialized: Jenkins home directory: /var/lib/jenkins found at:
Mar 03 16:19:20 jenk jenkins[31396]: 2024-03-03 16:19:20.048+0000 [id=1]        INFO        o.e.j.s.handler.ContextHandler#doStart: Started w.@22367b8{Jenkins v2.440.1,/,file:///va
Mar 03 16:19:20 jenk jenkins[31396]: 2024-03-03 16:19:20.098+0000 [id=1]        INFO        o.e.j.server.AbstractConnector#doStart: Started ServerConnector@1ab06251{HTTP/1.1, (http
Mar 03 16:19:20 jenk jenkins[31396]: 2024-03-03 16:19:20.127+0000 [id=1]        INFO        org.eclipse.jetty.server.Server#doStart: Started Server@4f3bbf68{STARTING}[10.0.18,sto=0
Mar 03 16:19:20 jenk jenkins[31396]: 2024-03-03 16:19:20.138+0000 [id=26]        INFO        winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
Mar 03 16:19:20 jenk jenkins[31396]: 2024-03-03 16:19:20.765+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: Started initialization
Mar 03 16:19:20 jenk jenkins[31396]: 2024-03-03 16:19:20.789+0000 [id=32]        INFO        jenkins.InitReactorRunner$1#onAttained: Listed all plugins
Mar 03 16:19:22 jenk jenkins[31396]: 2024-03-03 16:19:22.967+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
Mar 03 16:19:22 jenk jenkins[31396]: 2024-03-03 16:19:22.977+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: Started all plugins
Mar 03 16:19:23 jenk jenkins[31396]: 2024-03-03 16:19:23.001+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
Mar 03 16:19:23 jenk jenkins[31396]: 2024-03-03 16:19:23.475+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: System config loaded
Mar 03 16:19:23 jenk jenkins[31396]: 2024-03-03 16:19:23.476+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: System config adapted
Mar 03 16:19:23 jenk jenkins[31396]: 2024-03-03 16:19:23.476+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
Mar 03 16:19:23 jenk jenkins[31396]: 2024-03-03 16:19:23.478+0000 [id=33]        INFO        jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
Mar 03 16:19:23 jenk jenkins[31396]: 2024-03-03 16:19:23.542+0000 [id=48]        INFO        hudson.util.Retrier#start: Attempt #1 to do the action check updates server
Mar 03 16:19:24 jenk jenkins[31396]: 2024-03-03 16:19:24.873+0000 [id=33]        INFO        jenkins.install.SetupWizard#init:
Mar 03 16:19:24 jenk jenkins[31396]: *************************************************************
Mar 03 16:19:24 jenk jenkins[31396]: *************************************************************
Mar 03 16:19:24 jenk jenkins[31396]: *************************************************************
Mar 03 16:19:24 jenk jenkins[31396]: Jenkins initial setup is required. An admin user has been created and a password generated.
Mar 03 16:19:24 jenk jenkins[31396]: Please use the following password to proceed to installation:
Mar 03 16:19:24 jenk jenkins[31396]: 60e208300deb4b88a964b720026c0e16
Mar 03 16:19:24 jenk jenkins[31396]: This may also be found at: /var/lib/jenkins/secrets/initialAdminPassword
Mar 03 16:19:24 jenk jenkins[31396]: *************************************************************
Mar 03 16:19:24 jenk jenkins[31396]: *************************************************************
Mar 03 16:19:24 jenk jenkins[31396]: *************************************************************
Mar 03 16:19:56 jenk jenkins[31396]: 2024-03-03 16:19:56.176+0000 [id=32]        INFO        jenkins.InitReactorRunner$1#onAttained: Completed initialization
Mar 03 16:19:56 jenk jenkins[31396]: 2024-03-03 16:19:56.210+0000 [id=25]        INFO        hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running
Mar 03 16:19:56 jenk systemd[1]: Started Jenkins Continuous Integration Server.
Mar 03 16:19:56 jenk jenkins[31396]: 2024-03-03 16:19:56.316+0000 [id=48]        INFO        h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.
Mar 03 16:19:56 jenk jenkins[31396]: 2024-03-03 16:19:56.317+0000 [id=48]        INFO        hudson.util.Retrier#start: Performed the action check updates server successfully at th
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.921+0000 [id=18]        INFO        hudson.PluginManager#install: Starting installation of a batch of 20 plugins plus their
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.929+0000 [id=18]        INFO        hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of ionicons-api for plu
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.937+0000 [id=18]        INFO        hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of token-macro for plug
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.938+0000 [id=18]        INFO        hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of json-path-api for pl
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.938+0000 [id=18]        INFO        hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of structs for plugin t
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.939+0000 [id=18]        INFO        hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of workflow-step-api fo
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.942+0000 [id=18]        INFO        hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of plain-credentials fo
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.943+0000 [id=18]        INFO        hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of instance-identity fo
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.942+0000 [id=75]        INFO        h.model.UpdateCenter$DownloadJob#run: Starting the installation of ionicons-api on beha
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.946+0000 [id=75]        INFO        h.m.UpdateCenter$UpdateCenterConfiguration#download: Downloading ionicons-api
Mar 03 16:22:01 jenk jenkins[31396]: 2024-03-03 16:22:01.946+0000 [id=18]        INFO        hudson.model.UpdateSite$Plugin#deploy: Adding dependent install of bouncycastle-api for

I can’t see any errors in this one. :thinking:

its good now.
I removed jenkins.repo using

// [root@jenk yum.repos.d]# sudo rm -r jenkins.repo (to remove jenkins.repo)
later i did
[root@jenk yum.repos.d]# sudo wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/redhat-stable/jenkins.repo

now its not throwing any errors…
Its fine now

1 Like

Thanks a lot for the feedback. :+1:

1 Like

Actually

Thank you so much for your responses :slight_smile:

I’m eager to gain a thorough understanding of DevOps.

Lead me as my mentor on this learning journey.

Your extensive knowledge would greatly enhance my comprehension of these concepts.

Thank you Masterr :slight_smile:

I’m in no way a masterr at anything, but thanks for the kind words. :hugs:

1 Like