Currently docker 1.7.1 was installed on my machine, I want to upgrade it to latest version by below steps.
1. service docker stop
2. wget https://get.docker.com/builds/Linux/x86_64/docker-latest -O /usr/bin/docker
3. service docker start
But I met issues when I executed the third step.
[root#xxx ~]# service docker start
Redirecting to /bin/systemctl start docker.service
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
Then I execute the two command to get more info like below
[root#xxxxx ~]# systemctl status docker.service
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled)
Active: failed (Result: exit-code) since Thu 2015-12-24 21:18:20 EST; 22s ago
Docs: http://docs.docker.com
Process: 28160 ExecStart=/usr/bin/docker -d $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY (code=exited, status=2)
Main PID: 28160 (code=exited, status=2)
Dec 24 21:18:20 abc.host.com systemd[1]: Starting Docker Application Container Engine...
Dec 24 21:18:20 abc.host.com docker[28160]: Warning: '-d' is deprecated, it will be removed soon. See usage.
Dec 24 21:18:20 abc.host.com docker[28160]: flag provided but not defined: --add-registry
Dec 24 21:18:20 abc.host.com docker[28160]: See '/usr/bin/docker --help'.
Dec 24 21:18:20 abc.host.com systemd[1]: docker.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 24 21:18:20 abc.host.com systemd[1]: Failed to start Docker Application Container Engine.
Dec 24 21:18:20 abc.host.com systemd[1]: Unit docker.service entered failed state.
[root#xxxxx ~]# journalctl -xn
-- Logs begin at Mon 2015-12-07 06:26:15 EST, end at Thu 2015-12-24 21:18:20 EST. --
Dec 24 21:18:20 abc.host.com systemd[1]: docker-storage-setup.service: main process exited, code=exited, status=1/FAILURE
Dec 24 21:18:20 abc.host.com systemd[1]: Failed to start Docker Storage Setup.
-- Subject: Unit docker-storage-setup.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker-storage-setup.service has failed.
--
-- The result is failed.
Dec 24 21:18:20 abc.host.com systemd[1]: Unit docker-storage-setup.service entered failed state.
Dec 24 21:18:20 abc.host.com systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Dec 24 21:18:20 abc.host.com docker[28160]: Warning: '-d' is deprecated, it will be removed soon. See usage.
Dec 24 21:18:20 abc.host.com docker[28160]: flag provided but not defined: --add-registry
Dec 24 21:18:20 abc.host.com docker[28160]: See '/usr/bin/docker --help'.
Dec 24 21:18:20 abc.host.com systemd[1]: docker.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 24 21:18:20 abc.host.com 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.
Dec 24 21:18:20 abc.host.com systemd[1]: Unit docker.service entered failed state.
RHEL bundles its own version of the Docker daemon with additional command line options like --add-registry. See also https://access.redhat.com/articles/1354823.
The systemd scripts on RHEL are modeled around the RHEL Docker daemon and its additional options. If you drop in a Docker release directly from Docker.com, you will get startup issues. You either need to modify the systemd scripts or you need to stick to the official RHEL and CentOS upgrade channels.
This is mentioned in issue 17566
the 1.9 rpms now bundle a selinux policy: http://yum.dockerproject.org/repo/testing/centos/7/Packages/
created docker repo using http://yum.dockerproject.org/repo/testing/centos/7/Packages/ and successfully installed and started latest docker-engine.
Note: you can use also http://yum.dockerproject.org/repo/main/centos/7/Packages/, which include the latest 1.9.1 official package for CentOS.
rpm -qa | grep docker
yum install -y http://yum.dockerproject.org/repo/main/centos/7/Packages/docker-engine-1.9.1-1.el7.centos.x86_64.rpm
Related
I'm trying to install docker on my virtual machine:
Update the apt package index and install Docker
$sudo apt update
$sudo apt install docker.io -y
Add current user to the docker group:
$sudo usermod -aG docker ${USER}
$su - ${USER}
Check whether you can access and download images from Docker Hub
$docker run hello-world
When I start docker, I get this error
liaomei#liaomei-virtualbox:~$ systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
This is systemctl status docker output
liaomei#liaomei-virtualbox:~$ systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-11-08 09:15:06 +07; 3h 25min ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Process: 26449 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, stat>
Main PID: 26449 (code=exited, status=1/FAILURE)
Thg 11 08 09:15:03 liaomei-virtualbox systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Thg 11 08 09:15:03 liaomei-virtualbox systemd[1]: docker.service: Failed with result 'exit-code'.
Thg 11 08 09:15:03 liaomei-virtualbox systemd[1]: Failed to start Docker Application Container Engine.
Thg 11 08 09:15:06 liaomei-virtualbox systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Thg 11 08 09:15:06 liaomei-virtualbox systemd[1]: Stopped Docker Application Container Engine.
Thg 11 08 09:15:06 liaomei-virtualbox systemd[1]: docker.service: Start request repeated too quickly.
Thg 11 08 09:15:06 liaomei-virtualbox systemd[1]: docker.service: Failed with result 'exit-code'.
Thg 11 08 09:15:06 liaomei-virtualbox systemd[1]: Failed to start Docker Application Container Engine.
This is journalctl -xe output
liaomei#liaomei-virtualbox:~$ journalctl -xe
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit docker.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Thg 11 08 12:41:02 liaomei-virtualbox systemd[1]: Stopped Docker Application Container Engine.
-- Subject: A stop job for unit docker.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit docker.service has finished.
--
-- The job identifier is 2298 and the job result is done.
Thg 11 08 12:41:02 liaomei-virtualbox systemd[1]: docker.service: Start request repeated too quickly.
Thg 11 08 12:41:02 liaomei-virtualbox systemd[1]: docker.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit docker.service has entered the 'failed' state with result 'exit-code'.
Thg 11 08 12:41:02 liaomei-virtualbox systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: A start job for unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit docker.service has finished with a failure.
--
-- The job identifier is 2298 and the job result is failed.
Thg 11 08 12:41:02 liaomei-virtualbox systemd[1]: docker.socket: Failed with result 'service-start-limit-hit'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit docker.socket has entered the 'failed' state with result 'service-start-limit-hit'.
This is my machine info
liaomei#liaomei-virtualbox:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
liaomei#liaomei-virtualbox:~$ uname -r
5.15.0-rc7+
liaomei#liaomei-virtualbox:~$ hostnamectl
Static hostname: liaomei-virtualbox
Icon name: computer-vm
Chassis: vm
Machine ID: 65805268c46b491797a9463a127e30ba
Boot ID: 6d9543a77b884bea97da01da1f690e74
Virtualization: oracle
Operating System: Ubuntu 20.04.3 LTS
Kernel: Linux 5.15.0-rc7+
Architecture: x86-64
I can't find the actual error in these output. Could you tell me where the problem is and how to fix it.
I'm following the Certified Kubernetes Application Developer (CKAD) Certification, and in their manual they are providing a bash file to deploy a master node using Kubeadm, and this is it's content :
https://gofile.io/d/d2l1UJ
But when I run this bash file using: sudo bash deploy.sh I get an error message as shown in this screenshot:
I tried to start docker using: sudo systemctl start docker but I get this error:
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
So then I run systemctl status docker.service and I get this:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-07-21 05:31:17 PDT; 1min 0s ago
Docs: https://docs.docker.com
Process: 10196 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 10196 (code=exited, status=1/FAILURE)
Jul 21 05:31:15 master systemd[1]: Failed to start Docker Application Container Engine.
Jul 21 05:31:17 master systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 21 05:31:17 master systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Jul 21 05:31:17 master systemd[1]: Stopped Docker Application Container Engine.
Jul 21 05:31:17 master systemd[1]: docker.service: Start request repeated too quickly.
Jul 21 05:31:17 master systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 21 05:31:17 master systemd[1]: Failed to start Docker Application Container Engine.
And when I run journalctl -xe:
-- Unit kubelet.service has finished starting up.
--
-- The start-up result is RESULT.
Jul 21 05:32:46 master kubelet[10531]: F0721 05:32:46.664769 10531 server.go:199] failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file "/var/lib/kubelet/config.yaml",
Jul 21 05:32:46 master systemd[1]: kubelet.service: Main process exited, code=exited, status=255/n/a
Jul 21 05:32:46 master systemd[1]: kubelet.service: Failed with result 'exit-code'.
Jul 21 05:32:56 master systemd[1]: kubelet.service: Service hold-off time over, scheduling restart.
Jul 21 05:32:56 master systemd[1]: kubelet.service: Scheduled restart job, restart counter is at 189.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit kubelet.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jul 21 05:32:56 master systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
-- Subject: Unit kubelet.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit kubelet.service has finished shutting down.
Jul 21 05:32:56 master systemd[1]: Started kubelet: The Kubernetes Node Agent.
-- Subject: Unit kubelet.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit kubelet.service has finished starting up.
--
-- The start-up result is RESULT.
Jul 21 05:32:56 master kubelet[10562]: F0721 05:32:56.915762 10562 server.go:199] failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file "/var/lib/kubelet/config.yaml",
Jul 21 05:32:56 master systemd[1]: kubelet.service: Main process exited, code=exited, status=255/n/a
Jul 21 05:32:56 master systemd[1]: kubelet.service: Failed with result 'exit-code'.
Jul 21 05:33:07 master systemd[1]: kubelet.service: Service hold-off time over, scheduling restart.
Jul 21 05:33:07 master systemd[1]: kubelet.service: Scheduled restart job, restart counter is at 190.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit kubelet.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jul 21 05:33:07 master systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
-- Subject: Unit kubelet.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit kubelet.service has finished shutting down.
Jul 21 05:33:07 master systemd[1]: Started kubelet: The Kubernetes Node Agent.
-- Subject: Unit kubelet.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit kubelet.service has finished starting up.
--
-- The start-up result is RESULT.
Jul 21 05:33:07 master kubelet[10594]: F0721 05:33:07.167571 10594 server.go:199] failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file "/var/lib/kubelet/config.yaml",
Jul 21 05:33:07 master systemd[1]: kubelet.service: Main process exited, code=exited, status=255/n/a
Jul 21 05:33:07 master systemd[1]: kubelet.service: Failed with result 'exit-code'.
#Edit:
It seems that my host configuration is fine, when I run the bash file to check for the host config before starting the CKAD course I get this:
Checking that this computer is suitable for LFD459: Kubernetes for App Developers
--------------------------------------------------------------------------------
PASS: CPU architecture is x86_64
PASS: 4 core CPU
PASS: Your CPU appears powerful enough (currently at 28800 BogoMIPS cumulatively)
PASS: 8 GiB RAM
PASS: 18 GiB free disk space in /home/student
PASS: 18544 MiB free disk space in /boot
PASS: Linux distribution architecture is x86_64
NOTE: Currently running Ubuntu 18.04.4 LTS (supported)
PASS: Internet is available (which is required in this case)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
NOTE: Verifying LFD459_V1.18.1_SOLUTIONS.tar.bz2...
LFD459_V1.18.1_SOLUTIONS.tar.bz2 can be found in /home/student/LFT (matches md5sum)
--------------------------------------------------------------------------------
PASS: You are ready for the course! W00t!
NOTE: Make sure to follow the instructions above to fix any issues found
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.
i want create private registry and follow this answer Setting up a remote private Docker registry
docker run -p 5000:5000 registry
and other servre modify /usr/lib/systemd/system/docker.service file to disable https
ExecStart=/usr/bin/dockerd --insecure-registry 172.24.54.41:5000
i can curl 172.24.54.41:5000
sudo service docker stop
sudo systemctl daemon-reload
sudo systemctl start docker
the error log in systemctl status docker.service
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Mon 2017-12-11 16:52:23 CST; 6min ago
Docs: https://docs.docker.com
Process: 13300 ExecStart=/usr/bin/dockerd --insecure-registry 172.24.54.41:5000 (code=exited, status=1/FAILURE)
Main PID: 13300 (code=exited, status=1/FAILURE)
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: Failed to start Docker Application Container Engine.
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: Unit docker.service entered failed state.
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: docker.service failed.
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: docker.service holdoff time over, scheduling restart.
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: start request repeated too quickly for docker.service
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: Failed to start Docker Application Container Engine.
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: Unit docker.service entered failed state.
Dec 11 16:52:23 iZhp39y3a2bx21oz0waijyZ systemd[1]: docker.service failed.
how to solve it?
It seems that the issue does not lie with your running of a registry but with your configuration of the docker service.
Could you link the content of your usr/lib/systemd/system/docker.service file?
So I installed docker engine on RHEL 7
Now when I do a
service docker start
I get the following error:
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
and when I go to "systemctl status docker.service" and "journalctl -xe"
I get:
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
└─docker.conf
Active: failed (Result: exit-code) since Thu 2016-09-08 22:15:53 EDT; 10s ago
Docs: https://docs.docker.com
Process: 13504 ExecStart=/usr/bin/docker daemon -H fd:// --mtu 1400 --exec-opt native.cgroupdriver=systemd (code=exited, status=1/FAILURE)
Main PID: 13504 (code=exited, status=1/FAILURE)
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Starting Docker Application Container Engine...
Sep 08 22:15:53 app-linux2.app-netapp.lab.com docker[13504]: time="2016-09-08T22:15:53.227074798-04:00" level=fatal msg="no sockets found via socket activation: make sure the service ...by systemd"
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Failed to start Docker Application Container Engine.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Unit docker.service entered failed state.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service failed.
And
--
-- The start-up result is done.
Sep 08 22:10:01 app-linux2.app-netapp.lab.com CROND[12753]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Sep 08 22:10:01 app-linux2.app-netapp.lab.com systemd[1]: Starting Session 58 of user root.
-- Subject: Unit session-58.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-58.scope has begun starting up.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com polkitd[766]: Registered Authentication Agent for unix-process:12878:2674931 (system bus name :1.173 [/usr/bin/pkttyagent --notify-fd 5 --fallback], ob
Sep 08 22:10:53 app-linux2.app-netapp.lab.com systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com docker[12895]: time="2016-09-08T22:10:53.413304246-04:00" level=fatal msg="no sockets found via socket activation: make sure the service was started by
Sep 08 22:10:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Sep 08 22:10:53 app-linux2.app-netapp.lab.com 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.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com systemd[1]: Unit docker.service entered failed state.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service failed.
Sep 08 22:10:53 app-linux2.app-netapp.lab.com polkitd[766]: Unregistered Authentication Agent for unix-process:12878:2674931 (system bus name :1.173, object path /org/freedesktop/PolicyKit1/Authent
Sep 08 22:13:36 app-linux2.app-netapp.lab.com polkitd[766]: Registered Authentication Agent for unix-process:13214:2691210 (system bus name :1.174 [/usr/bin/pkttyagent --notify-fd 5 --fallback], ob
Sep 08 22:13:36 app-linux2.app-netapp.lab.com polkitd[766]: Unregistered Authentication Agent for unix-process:13214:2691210 (system bus name :1.174, object path /org/freedesktop/PolicyKit1/Authent
Sep 08 22:15:53 app-linux2.app-netapp.lab.com polkitd[766]: Registered Authentication Agent for unix-process:13489:2704913 (system bus name :1.175 [/usr/bin/pkttyagent --notify-fd 5 --fallback], ob
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Starting Docker Application Container Engine...
-- Subject: Unit docker.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has begun starting up.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com docker[13504]: time="2016-09-08T22:15:53.227074798-04:00" level=fatal msg="no sockets found via socket activation: make sure the service was started by
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Sep 08 22:15:53 app-linux2.app-netapp.lab.com 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.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: Unit docker.service entered failed state.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com systemd[1]: docker.service failed.
Sep 08 22:15:53 app-linux2.app-netapp.lab.com polkitd[766]: Unregistered Authentication Agent for unix-process:13489:2704913 (system bus name :1.175, object path /org/freedesktop/PolicyKit1/Authent
lines 3473-3523/3523 (END)
I tried to search solution for this
but could not find any.
Just Remove Docker Lib and restart it again with:
sudo rm -rf /var/lib/docker
then
sudo systemctl enable docker
sudo systemctl start docker
Check your OS logs files for warning or error messages.
Probably you have made a mistake in the config files of docker and when the service starts it gets an error.
The log's location depends on your OS.
On Linux system logs are often in:
/var/log/daemon.log
/var/log/docker
/var/log/messages
/var/log/syslog
/var/log/upstart/docker.log
Some useful linux console commands to inspect docker logs:
sudo systemctl status docker.service
sudo journalctl -fu docker.service
cat /var/log/daemon.log | grep docker
cat /var/log/messages | grep docker
If you are using Windows this article might be helpful
Here are more details
What version of Docker do you use? If you are not locked to the elder one, consider use of the most recent version (currently it's 1.12). Here's my startup options (Debian 8, /etc/systemd/system/docker.service):
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target docker.socket
Requires=docker.socket
[Service]
Type=notify
ExecStart=/usr/bin/docker daemon -H fd:// --dns=10.240.116.7 --dns 8.8.8.8 --bip=172.17.42.1/24
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
Also try to start Docker in debug mode (-D) without systemd, just like if it was a common program. This will help to find out why daemon doesn't start.
Fixing the Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. problem, for me this worked:
create daemon.json in /etc/docker/
put this in it:
{
"exec-root": "/path/to/docker/run",
"storage-driver": "overlay",
"graph": "/path/to/docker/lib"
}
then try: docker daemon
reboot
docker run hello-world should succeed now
There are many reasons for docker service failing to run. One of them that I encountered is using single quotes instead of double quotes for the key value pairs in the json file.
It fails
sudo cat > /etc/docker/daemon.json << '_EOF'
{
'registry-mirrors': ['https://docker.io']
}
_EOF
It works!
sudo cat > /etc/docker/daemon.json << '_EOF'
{
"registry-mirrors": ["https://docker.io"]
}
_EOF
For more info see here
I came across same issue in my Linux VM(virtual machine).
System details : ubuntu 18.04
I had to just delete my daemon.json and then do a service docker start this worked for me.
Note: I had put insecure registry in my daemon.json file and i didn't want that as well hence i deleted it. I don't know it's usage though.