After installing Java and Jenkins on my CentOS 7 server. I tried to start the Jenkins, and I am getting the below error message.
Job for jenkins.service failed. See "systemctl status jenkins.service"
and "journalctl -xe" for details.
When I run "systemctl status jenkins.service" to see what the issue is, I get the below output
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Thu 2022-08-18 14:23:02 UTC; 20s ago
Process: 8847 ExecStart=/usr/bin/jenkins (code=exited, status=0/SUCCESS)
Main PID: 8847 (code=exited, status=0/SUCCESS)
Aug 18 14:23:02 localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
Aug 18 14:23:02 localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
Aug 18 14:23:02 localhost.localdomain systemd[1]: jenkins.service failed.
Aug 18 14:23:02 localhost.localdomain systemd[1]: jenkins.service holdoff time over, scheduling restart.
Aug 18 14:23:02 localhost.localdomain systemd[1]: Stopped Jenkins Continuous Integration Server.
Aug 18 14:23:02 localhost.localdomain systemd[1]: start request repeated too quickly for jenkins.service
Aug 18 14:23:02 localhost.localdomain systemd[1]: Failed to start Jenkins Continuous Integration Server.
Aug 18 14:23:02 localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
Aug 18 14:23:02 localhost.localdomain systemd[1]: jenkins.service failed.
Not quite sure how to fix this. Anybody with a solution? Thanks
can you please use journalctl -xe for more detailed logs.
also can you run Jenkins in interactive mode to see why its failing to start like -
java -jar jenkins.war
you can get command details in /usr/bin/jenkins file.
Related
I was trying to install jenkins in ec2 ubuntu and amazon-linux but I am getting this error
jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-11-27 16:29:54 UTC; 1h 8min ago
Process: 18706 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
Main PID: 18706 (code=exited, status=1/FAILURE)
Nov 27 16:29:54 ip-172-31-19-156 systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE
Nov 27 16:29:54 ip-172-31-19-156 systemd[1]: jenkins.service: Failed with result 'exit-code'.
Nov 27 16:29:54 ip-172-31-19-156 systemd[1]: Failed to start Jenkins Continuous Integration Server.
Nov 27 16:29:54 ip-172-31-19-156 systemd[1]: jenkins.service: Scheduled restart job, restart counter is at 5.
Nov 27 16:29:54 ip-172-31-19-156 systemd[1]: Stopped Jenkins Continuous Integration Server.
Nov 27 16:29:54 ip-172-31-19-156 systemd[1]: jenkins.service: Start request repeated too quickly.
Nov 27 16:29:54 ip-172-31-19-156 systemd[1]: jenkins.service: Failed with result 'exit-code'.
Nov 27 16:29:54 ip-172-31-19-156 systemd[1]: Failed to start Jenkins Continuous Integration Server.
root#ip-172-31-19-156:~# cd /car/usr
First I installed jenkins and was interrupted in between that I changed the ec2 volume for reset my ec2, after this I'm unable to install jenkins in ec2
I had changed my nodes' runtime into containerd. But now i would like to use docker tool instead. I try refresh the dockerd service config as follow:
[Service]
......
ExecStart=/usr/bin/dockerd --selinux-enabled=false --insecure-registry=127.0.0.1 -H fd:// --containerd=/var/run/containerd/containerd.sock --cri-containerd --debug
......
And it doesn t work unexpected.
$ systemctl status docker.service
● docker.service
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/docker.service.d
└─http-proxy.conf
Active: failed (Result: start-limit) since Mon 2022-11-07 16:10:51 CST; 10s ago
Docs: https://docs.docker.com
Process: 4872 ExecStart=/usr/bin/dockerd --selinux-enabled=false --insecure-registry=127.0.0.1 -H fd:// --containerd=/var/run/containerd/containerd.sock --cri-containerd --debug (code=exited, status=1/FAILURE)
Main PID: 4872 (code=exited, status=1/FAILURE)
Nov 07 16:10:51 master systemd[1]: Failed to start docker.service.
Nov 07 16:10:51 master systemd[1]: Unit docker.service entered failed state.
Nov 07 16:10:51 master systemd[1]: docker.service failed.
Nov 07 16:10:51 master systemd[1]: docker.service holdoff time over, scheduling restart.
Nov 07 16:10:51 master systemd[1]: Stopped docker.service.
Nov 07 16:10:51 master systemd[1]: start request repeated too quickly for docker.service
Nov 07 16:10:51 master systemd[1]: Failed to start docker.service.
Nov 07 16:10:51 master systemd[1]: Unit docker.service entered failed state.
Nov 07 16:10:51 master systemd[1]: docker.service failed.
I suppose it is easy before. Please tell me the right config.
I expect it will work easily.
I want to install docker-ce,but it cannot launch
I install docker-ce in this way:
sudo yum install docker-ce
My system type:
Linux version 3.10.107-1-tlinux2_kvm_guest-0046 (root#TENCENT64.site) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Wed Dec 27 10:57:04 CST 2017
docker version:
docker version
Client:
Version: 18.09.7
API version: 1.39
Go version: go1.10.8
Git commit: 2d0083d
Built: Thu Jun 27 17:56:06 2019
OS/Arch: linux/amd64
Experimental: false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
error info detail:
systemctl status docker.service
* docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/docker.service.d
`-override.conf
Active: failed (Result: start-limit) since Wed 2019-07-31 10:12:15 CST; 921ms ago
Docs: https://docs.docker.com
Process: 15961 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 15961 (code=exited, status=1/FAILURE)
Jul 31 10:12:13 TENCENT64.site systemd[1]: Failed to start Docker Application Container Engine.
Jul 31 10:12:13 TENCENT64.site systemd[1]: Unit docker.service entered failed state.
Jul 31 10:12:13 TENCENT64.site systemd[1]: docker.service failed.
Jul 31 10:12:15 TENCENT64.site systemd[1]: docker.service holdoff time over, scheduling restart.
Jul 31 10:12:15 TENCENT64.site systemd[1]: Stopped Docker Application Container Engine.
Jul 31 10:12:15 TENCENT64.site systemd[1]: start request repeated too quickly for docker.service
Jul 31 10:12:15 TENCENT64.site systemd[1]: Failed to start Docker Application Container Engine.
Jul 31 10:12:15 TENCENT64.site systemd[1]: Unit docker.service entered failed state.
Jul 31 10:12:15 TENCENT64.site systemd[1]: docker.service failed.
journalctl -xe
Jul 31 10:12:13 TENCENT64.site systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Jul 31 10:12:13 TENCENT64.site systemd[1]: Unit docker.service entered failed state.
Jul 31 10:12:13 TENCENT64.site systemd[1]: docker.service failed.
Jul 31 10:12:15 TENCENT64.site systemd[1]: docker.service holdoff time over, scheduling restart.
Jul 31 10:12:15 TENCENT64.site systemd[1]: Stopped Docker Application Container Engine.
-- Subject: Unit docker.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has finished shutting down.
Jul 31 10:12:15 TENCENT64.site systemd[1]: Closed Docker Socket for the API.
-- Subject: Unit docker.socket has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished shutting down.
Jul 31 10:12:15 TENCENT64.site systemd[1]: Stopping Docker Socket for the API.
-- Subject: Unit docker.socket has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun shutting down.
Jul 31 10:12:15 TENCENT64.site systemd[1]: Starting Docker Socket for the API.
-- Subject: Unit docker.socket has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has begun starting up.
Jul 31 10:12:15 TENCENT64.site systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.socket has finished starting up.
--
-- The start-up result is done.
Jul 31 10:12:15 TENCENT64.site systemd[1]: start request repeated too quickly for docker.service
Jul 31 10:12:15 TENCENT64.site systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
-- The result is failed.
Jul 31 10:12:15 TENCENT64.site systemd[1]: Unit docker.service entered failed state.
Jul 31 10:12:15 TENCENT64.site systemd[1]: docker.service failed.
my daemon.json(/etc/docker/daemon.json)is not exist, when i create a daemon.json with its content '{}',also error
I have tried some ways:
clear /var/lib/docker
reinstall docker-ce
docker's old version docker and docker-io is normal,but it no ip and port mapping, so i use docker-ce now.
how to fix this question?
Docker can be started with two different methods :
Via systemctl, which is the recommanded way
Directly via the docker daemon bin : dockerd which is not the recommanded way
However, when you start the docker daemon directly (ie not with systemctl), systemctl has no way to know the current status of the daemon.
So my guess is that, after the install, the docker daemon was somehow partially started and failed.
To check if that's the case, just run :
sudo ps -aux | grep dockerd
Then kill all the process attached to the docker daemon.
When it is done, you should be able to start docker directly via systemctl.
We have installed docker 17.12 in our Centos 7.x and after the installation is complete, am facing an error while trying to start the docker service. Initially, I tried for systemctl docker start then for more output on this when I tried journalctl it says docker.service entered failed state.
More details below:
Docker :
17.12.1-ce , build 7390fc6
Command tried:
sudo systemctl start docker
journalctl -u docker.service
Expected Output:
Docker service should be started successfully
Actual output:
Mar 26 23:51:19 docker[16420]: See 'docker --help'
Mar 26 23:51:19 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Mar 26 23:51:19 systemd[1]: Failed to start Docker Application Container Engine.
Mar 26 23:51:19 systemd[1]: Unit docker.service entered failed state.
Mar 26 23:51:19 docker.service failed.
Mar 26 23:51:21 systemd[1]: docker.service holdoff time over, scheduling restart.
Mar 26 23:51:21 systemd[1]: start request repeated too quickly for docker.service
Mar 26 23:51:21 systemd[1]: Failed to start Docker Application Container Engine.
Mar 26 23:51:21 systemd[1]: Unit docker.service entered failed state.
Mar 26 23:51:21 systemd[1]: docker.service failed.
Mar 26 23:52:22 systemd[1]: Starting Docker Application Container Engine...
Mar 26 23:52:22 docker[16582]: docker: 'daemon' is not a docker command.
Mar 26 23:52:22 docker[16582]: See 'docker --help'
Mar 26 23:52:22 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Mar 26 23:52:22 systemd[1]: Failed to start Docker Application Container Engine.
Mar 26 23:52:22 systemd[1]: Unit docker.service entered failed state.
Mar 26 23:52:22 systemd[1]: docker.service failed.
Mar 26 23:52:24 systemd[1]: docker.service holdoff time over, scheduling restart.
Mar 26 23:52:24 systemd[1]: Starting Docker Application Container Engine...
Mar 26 23:52:25 docker[16601]: docker: 'daemon' is not a docker command.
Mar 26 23:52:25 docker[16601]: See 'docker --help'
Mar 26 23:52:25 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Mar 26 23:52:25 systemd[1]: Failed to start Docker Application Container Engine.
Mar 26 23:52:25 systemd[1]: Unit docker.service entered failed state.
Mar 26 23:52:25 systemd[1]: docker.service failed.
Mar 26 23:52:27 systemd[1]: docker.service holdoff time over, scheduling restart.
Mar 26 23:52:27 systemd[1]: Starting Docker Application Container Engine...
Mar 26 23:52:27 docker[16619]: docker: 'daemon' is not a docker command.
Mar 26 23:52:27 docker[16619]: See 'docker --help'
Mar 26 23:52:27 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Mar 26 23:52:27 systemd[1]: Failed to start Docker Application Container Engine.
Mar 26 23:52:27 systemd[1]: Unit docker.service entered failed state.
Mar 26 23:52:27 systemd[1]: docker.service failed.
Mar 26 23:52:29 systemd[1]: docker.service holdoff time over, scheduling restart.
Mar 26 23:52:29 systemd[1]: start request repeated too quickly for docker.service
Mar 26 23:52:29 systemd[1]: Failed to start Docker Application Container Engine.
Mar 26 23:52:29 systemd[1]: Unit docker.service entered failed state.
Mar 26 23:52:29 systemd[1]: docker.service failed.
Please check on this issue and help us resolve the docker start issue.
no evidence in your log.
Would you just reinstall with the official way ?
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sh get-docker.sh
Check if there's another issue with:
sudo dockerd --debug
In my situation I had invalid config in the daemon.json.
when i am trying to start my newly installed jenkins by
sudo systemctl start jenkins.service
It's giving me this error :
[root#no52 ~]# sudo service jenkins start
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]
[root#no52 ~]# systemctl status jenkins.service
● jenkins.service - LSB: Jenkins Automation Server
Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-06-15 16:05:14 UTC; 25s ago
Docs: man:systemd-sysv-generator(8)
Process: 8226 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:92)
Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: at com.sun.akuma.Daemon.daemonize(Daemon.java:106)
Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: at com.sun.akuma.Daemon.all(Daemon.java:88)
Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: ... 6 more
Jun 15 16:05:14 no1010042210152.corp.adobe.com runuser[8227]: pam_unix(runuser:session): session closed for user jenkins
Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: [FAILED]
Jun 15 16:05:14 no1010042210152.corp.adobe.com systemd[1]: jenkins.service: control process exited, code=exited status=1
Jun 15 16:05:14 no1010042210152.corp.adobe.com systemd[1]: Failed to start LSB: Jenkins Automation Server.
Jun 15 16:05:14 no1010042210152.corp.adobe.com systemd[1]: Unit jenkins.service entered failed state.
Jun 15 16:05:14 no1010042210152.corp.adobe.com systemd[1]: jenkins.service failed
Can someone please help me with it ?
PS : I do have Java installed
java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)
This error usually shows, when you don't have Java on your machine. Jenkins relay on Java.
Follow these steps to fix the issue:
sudo yum install java-1.8.0-openjdk
systemctl enable jenkins
systemctl start jenkins
systemctl status jenkins
Hopefully it will help.