InsideDarkWeb.com

Cannot connect to the Docker daemon at unix:///var/run/docker.sock

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:

enter image description here

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

#Edit 2:

This is the output of the command journalctl -b -l -u docker.service:

Jul 21 23:47:27 master systemd[1]: Starting Docker Application Container Engine...
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.953221050+02:00" level=info msg="Starting up"
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.954590238+02:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf"
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.955496259+02:00" level=info msg="parsed scheme: "unix"" module=grpc
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.955520337+02:00" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.955536944+02:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.955545650+02:00" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.956338328+02:00" level=info msg="parsed scheme: "unix"" module=grpc
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.956358305+02:00" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.956368715+02:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.956374109+02:00" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.959463090+02:00" level=error msg="failed to mount overlay: no such device" storage-driver=overlay2
Jul 21 23:47:27 master dockerd[52772]: time="2020-07-21T23:47:27.959623339+02:00" level=error msg="[graphdriver] prior storage driver overlay2 failed: driver not supported"
Jul 21 23:47:27 master dockerd[52772]: failed to start daemon: error initializing graphdriver: driver not supported
Jul 21 23:47:27 master systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jul 21 23:47:27 master systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 21 23:47:27 master systemd[1]: Failed to start Docker Application Container Engine.
Jul 21 23:47:30 master systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 21 23:47:30 master systemd[1]: docker.service: Scheduled restart job, restart counter is at 1.
Jul 21 23:47:30 master systemd[1]: Stopped Docker Application Container Engine.
Jul 21 23:47:30 master systemd[1]: Starting Docker Application Container Engine...
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.053867227+02:00" level=info msg="Starting up"
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.054769685+02:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf"
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.055652016+02:00" level=info msg="parsed scheme: "unix"" module=grpc
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.055674606+02:00" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.055698288+02:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.055704678+02:00" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.056367593+02:00" level=info msg="parsed scheme: "unix"" module=grpc
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.056486920+02:00" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.056573578+02:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.056716563+02:00" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.058739295+02:00" level=error msg="failed to mount overlay: no such device" storage-driver=overlay2
Jul 21 23:47:30 master dockerd[52861]: time="2020-07-21T23:47:30.058767565+02:00" level=error msg="[graphdriver] prior storage driver overlay2 failed: driver not supported"
Jul 21 23:47:30 master dockerd[52861]: failed to start daemon: error initializing graphdriver: driver not supported
Jul 21 23:47:30 master systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jul 21 23:47:30 master systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 21 23:47:30 master systemd[1]: Failed to start Docker Application Container Engine.
Jul 21 23:47:32 master systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 21 23:47:32 master systemd[1]: docker.service: Scheduled restart job, restart counter is at 2.
Jul 21 23:47:32 master systemd[1]: Stopped Docker Application Container Engine.
Jul 21 23:47:32 master systemd[1]: Starting Docker Application Container Engine...
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.308160161+02:00" level=info msg="Starting up"
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.309457450+02:00" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf"
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.310574227+02:00" level=info msg="parsed scheme: "unix"" module=grpc
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.310597573+02:00" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.310612962+02:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.310621281+02:00" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.311430901+02:00" level=info msg="parsed scheme: "unix"" module=grpc
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.311743318+02:00" level=info msg="scheme "unix" not registered, fallback to default scheme" module=grpc
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.311837521+02:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <nil>}] <nil>}" module=grpc
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.311906843+02:00" level=info msg="ClientConn switching balancer to "pick_first"" module=grpc
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.313638286+02:00" level=error msg="failed to mount overlay: no such device" storage-driver=overlay2
Jul 21 23:47:32 master dockerd[52943]: time="2020-07-21T23:47:32.313825356+02:00" level=error msg="[graphdriver] prior storage driver overlay2 failed: driver not supported"
Jul 21 23:47:32 master dockerd[52943]: failed to start daemon: error initializing graphdriver: driver not supported
Jul 21 23:47:32 master systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE

Output of the command hostnamectl

   Static hostname: minion
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 27887afb286041e0be11b5c369d4ae19
           Boot ID: 73f2db8c0a7d4abc9e079918251e2b77
    Virtualization: vmware
  Operating System: Ubuntu 18.04.5 LTS
            Kernel: Linux 5.7.0
      Architecture: x86-64

Server Fault Asked by Croviajo on November 14, 2021

0 Answers

Add your own answers!

Related Questions

rsync unexpected remote arg: [email protected]:/path

2  Asked on July 21, 2020 by pdiracdelta

   

Ask a Question

Get help from others!

© 2021 InsideDarkWeb.com. All rights reserved.