docker daemon is not startable - linux

Introduction
Today i had to move from my own virtual server to our companies linux server, where docker version 18.09.2 build 6247962 is installed. The server which provides me the error msgs is an ubuntu 18.04 lts server, my kernel: 4.4.0-042stab141.3
Unfortunately i can not talk to the old admin, because he left the company two years ago
What i did:
I need docker for my webcrawler. I’m not sure, if i already got the right image, so tried:
sudo docker pull scrapinghub/splash
After executing this command i got following error:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
I also tried chmod 666 /usr/run/docker.sock, because this was a “solution” i read about on stackoverflow.
When i execute service docker status i get:
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Fri 2020-10-23 11:46:30 CEST; 43min ago
Docs: https://docs.docker.com
Process: 7881 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
Main PID: 7881 (code=exited, status=1/FAILURE)
Also if i execute docker ps, to see my containers, i get:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: dial unix /var/run/docker.sock: connect: permission denied
when executing as root i get again:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I know there are several topics about that error, but none of them helped me, so I am trying it now with my own error messages.
EDIT
systemctl status docker:
* docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Fri 2020-10-23 14:44:43 CEST; 21min ago
Docs: https://docs.docker.com
Process: 12126 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
Main PID: 12126 (code=exited, status=1/FAILURE)
dockerd
INFO[2020-10-23T15:16:41.905718923+02:00] libcontainerd: started new docker-containerd process pid=13326
INFO[2020-10-23T15:16:41.905847880+02:00] parsed scheme: "unix" module=grpc
INFO[2020-10-23T15:16:41.905859360+02:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-10-23T15:16:41.905903222+02:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2020-10-23T15:16:41.905918045+02:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-10-23T15:16:41.905969169+02:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420601340, CONNECTING module=grpc
INFO[2020-10-23T15:16:41.935402002+02:00] starting containerd revision=9754871865f7fe2f4e74d43e2fc7ccd237edcbce version=docker-18.09.2
INFO[2020-10-23T15:16:41.935710291+02:00] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[2020-10-23T15:16:41.935737945+02:00] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1
WARN[2020-10-23T15:16:41.936336356+02:00] failed to load plugin io.containerd.snapshotter.v1.btrfs error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
INFO[2020-10-23T15:16:41.936354852+02:00] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1
WARN[2020-10-23T15:16:41.937768910+02:00] failed to load plugin io.containerd.snapshotter.v1.aufs error="modprobe aufs failed: "modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.4.0-042stab141.3/modules.builtin.bin'\nmodprobe: FATAL: Module aufs not found in directory /lib/modules/4.4.0-042stab141.3\n": exit status 1"
INFO[2020-10-23T15:16:41.937790278+02:00] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1
INFO[2020-10-23T15:16:41.937817682+02:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1
INFO[2020-10-23T15:16:41.937893773+02:00] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
WARN[2020-10-23T15:16:41.938518477+02:00] failed to load plugin io.containerd.snapshotter.v1.zfs error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter"
INFO[2020-10-23T15:16:41.938534393+02:00] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1
WARN[2020-10-23T15:16:41.938549461+02:00] could not use snapshotter zfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter"
WARN[2020-10-23T15:16:41.938557138+02:00] could not use snapshotter btrfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
WARN[2020-10-23T15:16:41.938565014+02:00] could not use snapshotter aufs in metadata plugin error="modprobe aufs failed: "modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.4.0-042stab141.3/modules.builtin.bin'\nmodprobe: FATAL: Module aufs not found in directory /lib/modules/4.4.0-042stab141.3\n": exit status 1"
INFO[2020-10-23T15:16:41.938661276+02:00] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1
INFO[2020-10-23T15:16:41.938679507+02:00] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1
INFO[2020-10-23T15:16:41.938717611+02:00] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1
INFO[2020-10-23T15:16:41.938730440+02:00] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1
INFO[2020-10-23T15:16:41.938744454+02:00] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1
INFO[2020-10-23T15:16:41.938761110+02:00] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1
INFO[2020-10-23T15:16:41.938772688+02:00] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1
INFO[2020-10-23T15:16:41.938784541+02:00] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1
INFO[2020-10-23T15:16:41.938796278+02:00] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1
INFO[2020-10-23T15:16:41.938807356+02:00] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1
INFO[2020-10-23T15:16:41.938875766+02:00] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2
INFO[2020-10-23T15:16:41.938921789+02:00] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1
INFO[2020-10-23T15:16:41.939301371+02:00] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1
INFO[2020-10-23T15:16:41.939328814+02:00] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1
INFO[2020-10-23T15:16:41.939371309+02:00] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939383717+02:00] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939395037+02:00] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939405310+02:00] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939439881+02:00] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939451270+02:00] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939461540+02:00] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939477843+02:00] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939488529+02:00] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1
INFO[2020-10-23T15:16:41.939543415+02:00] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939558389+02:00] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939568889+02:00] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939579026+02:00] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1
INFO[2020-10-23T15:16:41.939748944+02:00] serving... address="/var/run/docker/containerd/docker-containerd-debug.sock"
INFO[2020-10-23T15:16:41.939799183+02:00] serving... address="/var/run/docker/containerd/docker-containerd.sock"
INFO[2020-10-23T15:16:41.939810589+02:00] containerd successfully booted in 0.005619s
INFO[2020-10-23T15:16:41.946915966+02:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420601340, READY module=grpc
INFO[2020-10-23T15:16:41.950501665+02:00] parsed scheme: "unix" module=grpc
INFO[2020-10-23T15:16:41.950522807+02:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-10-23T15:16:41.950564242+02:00] parsed scheme: "unix" module=grpc
INFO[2020-10-23T15:16:41.950575481+02:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-10-23T15:16:41.950676109+02:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2020-10-23T15:16:41.950697518+02:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-10-23T15:16:41.950746317+02:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420601570, CONNECTING module=grpc
INFO[2020-10-23T15:16:41.950889604+02:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420601570, READY module=grpc
INFO[2020-10-23T15:16:41.950962148+02:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/docker-containerd.sock 0 <nil>}] module=grpc
INFO[2020-10-23T15:16:41.950978801+02:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-10-23T15:16:41.951015340+02:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420601810, CONNECTING module=grpc
INFO[2020-10-23T15:16:41.951146523+02:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420601810, READY module=grpc
ERRO[2020-10-23T15:16:41.952596133+02:00] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded. storage-driver=overlay2
ERRO[2020-10-23T15:16:41.953602275+02:00] AUFS was not found in /proc/filesystems storage-driver=aufs
ERRO[2020-10-23T15:16:41.954528718+02:00] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded. storage-driver=overlay
INFO[2020-10-23T15:16:41.956786508+02:00] Graph migration to content-addressability took 0.00 seconds
WARN[2020-10-23T15:16:41.958146162+02:00] Your kernel does not support oom control
WARN[2020-10-23T15:16:41.958167327+02:00] Your kernel does not support memory swappiness
WARN[2020-10-23T15:16:41.958182470+02:00] Your kernel does not support kernel memory limit
WARN[2020-10-23T15:16:41.958198841+02:00] Unable to find cpu cgroup in mounts
WARN[2020-10-23T15:16:41.958238330+02:00] Unable to find cpuset cgroup in mounts
WARN[2020-10-23T15:16:41.958309720+02:00] mountpoint for pids not found
INFO[2020-10-23T15:16:41.963433348+02:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
INFO[2020-10-23T15:16:41.963543844+02:00] stopping healthcheck following graceful shutdown module=libcontainerd
INFO[2020-10-23T15:16:41.967297616+02:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420601810, TRANSIENT_FAILURE module=grpc
INFO[2020-10-23T15:16:41.967319558+02:00] pickfirstBalancer: HandleSubConnStateChange: 0xc420601810, CONNECTING module=grpc
Error starting daemon: Devices cgroup isn't mounted
-- Logs begin at Fri 2020-10-23 11:03:38 CEST. --
Oct 23 14:44:39 dockerd[12126]: time="2020-10-23T14:44:39.944764478+02:00" level=warning msg="Your kernel does not support memory swappiness"
Oct 23 14:44:39 dockerd[12126]: time="2020-10-23T14:44:39.944777538+02:00" level=warning msg="Your kernel does not support kernel memory limit"
Oct 23 14:44:39 dockerd[12126]: time="2020-10-23T14:44:39.944793390+02:00" level=warning msg="Unable to find cpu cgroup in mounts"
Oct 23 14:44:39 dockerd[12126]: time="2020-10-23T14:44:39.944824929+02:00" level=warning msg="Unable to find cpuset cgroup in mounts"
Oct 23 14:44:39 dockerd[12126]: time="2020-10-23T14:44:39.944869519+02:00" level=warning msg="mountpoint for pids not found"
Oct 23 14:44:39 dockerd[12126]: time="2020-10-23T14:44:39.947106531+02:00" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
Oct 23 14:44:39 dockerd[12126]: time="2020-10-23T14:44:39.947131964+02:00" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
Oct 23 14:44:39 dockerd[12126]: time="2020-10-23T14:44:39.951205781+02:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc42401c7d0, TRANSIENT_FAILURE" module=grpc
Oct 23 14:44:39 dockerd[12126]: time="2020-10-23T14:44:39.951239041+02:00" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc42401c7d0, CONNECTING" module=grpc
Oct 23 14:44:40 dockerd[12126]: Error starting daemon: Devices cgroup isn't mounted
Also if i try docker info i get following error:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?```

Since I didn't get a reply to my queries from the chat in the link provided https://chat.stackoverflow.com/rooms/223520/discussion-between-y-y-and-moritz-sauter
Therefore, my answer below has some assumptions.
It seems you have been using AUFS as the docker storage driver in your "virtual server", which can be confirmed from docker info or in the daemon.json file usually found in this path /etc/docker/.
Given the above is true, when you moved to the new "company Linux server" which has a fairly newer Ubuntu and kernel, therefore there is high possibility that AUFS driver is not enabled by default, you can verify it by grep aufs /proc/filesystems.
My introspection comes from your docker logs, it has a warning
WARN[2020-10-23T15:16:41.937768910+02:00] failed to load plugin io.containerd.snapshotter.v1.aufs error="modprobe aufs failed: "modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.4.0-042stab141.3/modules.builtin.bin'\nmodprobe: FATAL: Module aufs not found in directory /lib/modules/4.4.0-042stab141.3\n": exit status 1"
Now if all of the above is true how to resolve?
You will probably have to move away from AUFS to overlay2 check this answer. Unless you have strict reasons to stick to AUFS, in that case you will have to switch to a different kernel this answer may help
Note: if you using some non standard kernel or older kernel please do so at your own risk, since there maybe some vulnerabilities which you may have to patch back

As per all the docker command outputs, it looks like the docker-daemon is down.
You can try to start the docker-daemon using one of the follow commands.
$ sudo systemctl start docker
or
$ sudo service docker start
After starting that, your commands will start to work.
And if it is failing, you can reset the limit and restart.
sudo systemctl reset-failed docker.service

Related

Docker service does not start anymore after Ubuntu 18.04 update: dm_task_run failed / no such device storage-driver=overlay2

After I triggered an unattended-upgrade on Ubuntu 18.04 (currently 18.04.5) and rebooted the server my docker service does not start anymore. So I tried to run it manually with sudo dockerd but got the following errors:
failed to mount overlay: no such device storage-driver=overlay2 docker
failed to start daemon: error initializing graphdriver: driver not
supported
After fiddling around with various suggestions (incl. the obligatory reboot x times) I gave up and uninstalled docker (incl. deleting usr/lib/docker) to reinstall the newest version. But this only changed the error message to:
failed to start daemon: error initializing graphdriver: devicemapper:
Error running deviceCreate (CreatePool) dm_task_run failed
I have more than enough disk space and already tried to delete the /usr/lib/docker folder (which btw. doesn't have an overlay2 folder which my previous installation at least had), but those suggestions didn't work. If I force --storage-driver=overlay2 I get the old "failed to mount overlay:..." from above.
I am now totally clueless how to solve this problem. Any ideas?
Edit: It seems that all the dm_* errors shouldn't be my problem, since they come from devicemapper which shouldn't be used. Instead the overlay2 stuff should work. So it all boils down to: Why does overlay2 not work (anymore?) on my machine?
Current versions:
Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-106-generic x86_64)
Docker version 19.03.12, build 48a66213fe
Full error message:
INFO[2020-09-10T12:38:41.720023381+02:00] Starting up
INFO[2020-09-10T12:38:41.721017055+02:00] detected 127.0.0.53
nameserver, assuming systemd-resolved, so using resolv.conf:
/run/systemd/resolve/resolv.conf
INFO[2020-09-10T12:38:41.723286420+02:00] parsed scheme: "unix"
module=grpc INFO[2020-09-10T12:38:41.723397263+02:00] scheme "unix"
not registered, fallback to default scheme module=grpc
INFO[2020-09-10T12:38:41.723468274+02:00] ccResolverWrapper: sending
update to cc: {[{unix:///run/containerd/containerd.sock 0 }]
} module=grpc INFO[2020-09-10T12:38:41.723493045+02:00]
ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-09-10T12:38:41.727552254+02:00] parsed scheme: "unix"
module=grpc INFO[2020-09-10T12:38:41.727619515+02:00] scheme "unix"
not registered, fallback to default scheme module=grpc
INFO[2020-09-10T12:38:41.727666336+02:00] ccResolverWrapper: sending
update to cc: {[{unix:///run/containerd/containerd.sock 0 }]
} module=grpc INFO[2020-09-10T12:38:41.727698707+02:00]
ClientConn switching balancer to "pick_first" module=grpc
ERRO[2020-09-10T12:38:41.845132923+02:00] [graphdriver] prior storage
driver devicemapper failed: devicemapper: Error running deviceCreate
(CreatePool) dm_task_run failed failed to start daemon: error
initializing graphdriver: devicemapper: Error running deviceCreate
(CreatePool) dm_task_run failed
I finally found the solution: It seems that the ubuntu update messed up while updating the kernel. After reinstalling the kernel everything works fine again and docker runs with overlay2.
So for me it was:
sudo apt-get install --reinstall linux-image-4.15.0-106-generic

GitLab keeps loading and finally fails when deploying a dockerized node.js app

GitLab Job Log
[0KRunning with gitlab-runner 13.2.0-rc2 (45f2b4ec)
[0;m[0K on docker-auto-scale fa6cab46
[0;msection_start:1595233272:prepare_executor
[0K[0K[36;1mPreparing the "docker+machine" executor[0;m
[0;m[0KUsing Docker executor with image gitlab/dind:latest ...
[0;m[0KStarting service docker:dind ...
[0;m[0KPulling docker image docker:dind ...
[0;m[0KUsing docker image sha256:d5d139be840a6ffa04348fc87740e8c095cade6e9cb977785fdba51e5fd7ffec for docker:dind ...
[0;m[0KWaiting for services to be up and running...
[0;m
[0;33m*** WARNING:[0;m Service runner-fa6cab46-project-18378289-concurrent-0-31a688551619da9f-docker-0 probably didn't start properly.
Health check error:
service "runner-fa6cab46-project-18378289-concurrent-0-31a688551619da9f-docker-0-wait-for-service" timeout
Health check container logs:
Service container logs:
2020-07-20T08:21:19.734721788Z time="2020-07-20T08:21:19.734543379Z" level=info msg="Starting up"
2020-07-20T08:21:19.742928068Z time="2020-07-20T08:21:19.742802844Z" level=warning msg="could not change group /var/run/docker.sock to docker: group docker not found"
2020-07-20T08:21:19.743943014Z time="2020-07-20T08:21:19.743853574Z" level=warning msg="[!] DON'T BIND ON ANY IP ADDRESS WITHOUT setting --tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!]"
2020-07-20T08:21:19.764021012Z time="2020-07-20T08:21:19.763898078Z" level=info msg="libcontainerd: started new containerd process" pid=23
2020-07-20T08:21:19.764159337Z time="2020-07-20T08:21:19.764107864Z" level=info msg="parsed scheme: \"unix\"" module=grpc
2020-07-20T08:21:19.764207629Z time="2020-07-20T08:21:19.764179926Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
2020-07-20T08:21:19.764319635Z time="2020-07-20T08:21:19.764279612Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>}" module=grpc
2020-07-20T08:21:19.764371375Z time="2020-07-20T08:21:19.764344798Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
2020-07-20T08:21:19.969344247Z time="2020-07-20T08:21:19.969193121Z" level=info msg="starting containerd" revision=7ad184331fa3e55e52b890ea95e65ba581ae3429 version=v1.2.13
2020-07-20T08:21:19.969863044Z time="2020-07-20T08:21:19.969784495Z" level=info msg="loading plugin "io.containerd.content.v1.content"..." type=io.containerd.content.v1
2020-07-20T08:21:19.970042302Z time="2020-07-20T08:21:19.969997665Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.btrfs"..." type=io.containerd.snapshotter.v1
2020-07-20T08:21:19.970399514Z time="2020-07-20T08:21:19.970336671Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.btrfs" error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
2020-07-20T08:21:19.970474776Z time="2020-07-20T08:21:19.970428684Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.aufs"..." type=io.containerd.snapshotter.v1
2020-07-20T08:21:20.019585153Z time="2020-07-20T08:21:20.019421401Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.aufs" error="modprobe aufs failed: "ip: can't find device 'aufs'\nmodprobe: can't change directory to '/lib/modules': No such file or directory\n": exit status 1"
2020-07-20T08:21:20.019709540Z time="2020-07-20T08:21:20.019668899Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.native"..." type=io.containerd.snapshotter.v1
2020-07-20T08:21:20.019934319Z time="2020-07-20T08:21:20.019887606Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.overlayfs"..." type=io.containerd.snapshotter.v1
2020-07-20T08:21:20.020299876Z time="2020-07-20T08:21:20.020218529Z" level=info msg="loading plugin "io.containerd.snapshotter.v1.zfs"..." type=io.containerd.snapshotter.v1
2020-07-20T08:21:20.021038477Z time="2020-07-20T08:21:20.020887571Z" level=info msg="skip loading plugin "io.containerd.snapshotter.v1.zfs"..." type=io.containerd.snapshotter.v1
2020-07-20T08:21:20.021162370Z time="2020-07-20T08:21:20.021121663Z" level=info msg="loading plugin "io.containerd.metadata.v1.bolt"..." type=io.containerd.metadata.v1
2020-07-20T08:21:20.021406797Z time="2020-07-20T08:21:20.021348536Z" level=warning msg="could not use snapshotter aufs in metadata plugin" error="modprobe aufs failed: "ip: can't find device 'aufs'\nmodprobe: can't change directory to '/lib/modules': No such file or directory\n": exit status 1"
2020-07-20T08:21:20.021487917Z time="2020-07-20T08:21:20.021435946Z" level=warning msg="could not use snapshotter zfs in metadata plugin" error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin"
2020-07-20T08:21:20.021581245Z time="2020-07-20T08:21:20.021533539Z" level=warning msg="could not use snapshotter btrfs in metadata plugin" error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
2020-07-20T08:21:20.030531741Z time="2020-07-20T08:21:20.030427430Z" level=info msg="loading plugin "io.containerd.differ.v1.walking"..." type=io.containerd.differ.v1
2020-07-20T08:21:20.030639854Z time="2020-07-20T08:21:20.030604536Z" level=info msg="loading plugin "io.containerd.gc.v1.scheduler"..." type=io.containerd.gc.v1
2020-07-20T08:21:20.030779501Z time="2020-07-20T08:21:20.030736875Z" level=info msg="loading plugin "io.containerd.service.v1.containers-service"..." type=io.containerd.service.v1
2020-07-20T08:21:20.030865060Z time="2020-07-20T08:21:20.030833703Z" level=info msg="loading plugin "io.containerd.service.v1.content-service"..." type=io.containerd.service.v1
2020-07-20T08:21:20.030955439Z time="2020-07-20T08:21:20.030912981Z" level=info msg="loading plugin "io.containerd.service.v1.diff-service"..." type=io.containerd.service.v1
2020-07-20T08:21:20.031027842Z time="2020-07-20T08:21:20.030998003Z" level=info msg="loading plugin "io.containerd.service.v1.images-service"..." type=io.containerd.service.v1
2020-07-20T08:21:20.031132325Z time="2020-07-20T08:21:20.031083782Z" level=info msg="loading plugin "io.containerd.service.v1.leases-service"..." type=io.containerd.service.v1
2020-07-20T08:21:20.031202966Z time="2020-07-20T08:21:20.031174445Z" level=info msg="loading plugin "io.containerd.service.v1.namespaces-service"..." type=io.containerd.service.v1
2020-07-20T08:21:20.031286993Z time="2020-07-20T08:21:20.031253528Z" level=info msg="loading plugin "io.containerd.service.v1.snapshots-service"..." type=io.containerd.service.v1
2020-07-20T08:21:20.031370557Z time="2020-07-20T08:21:20.031312376Z" level=info msg="loading plugin "io.containerd.runtime.v1.linux"..." type=io.containerd.runtime.v1
2020-07-20T08:21:20.031709756Z time="2020-07-20T08:21:20.031650044Z" level=info msg="loading plugin "io.containerd.runtime.v2.task"..." type=io.containerd.runtime.v2
2020-07-20T08:21:20.031941868Z time="2020-07-20T08:21:20.031897088Z" level=info msg="loading plugin "io.containerd.monitor.v1.cgroups"..." type=io.containerd.monitor.v1
2020-07-20T08:21:20.032929781Z time="2020-07-20T08:21:20.032846588Z" level=info msg="loading plugin "io.containerd.service.v1.tasks-service"..." type=io.containerd.service.v1
2020-07-20T08:21:20.033064279Z time="2020-07-20T08:21:20.033014391Z" level=info msg="loading plugin "io.containerd.internal.v1.restart"..." type=io.containerd.internal.v1
2020-07-20T08:21:20.034207198Z time="2020-07-20T08:21:20.034120505Z" level=info msg="loading plugin "io.containerd.grpc.v1.containers"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.034316027Z time="2020-07-20T08:21:20.034279582Z" level=info msg="loading plugin "io.containerd.grpc.v1.content"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.034402334Z time="2020-07-20T08:21:20.034369239Z" level=info msg="loading plugin "io.containerd.grpc.v1.diff"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.034482782Z time="2020-07-20T08:21:20.034452282Z" level=info msg="loading plugin "io.containerd.grpc.v1.events"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.034564724Z time="2020-07-20T08:21:20.034533365Z" level=info msg="loading plugin "io.containerd.grpc.v1.healthcheck"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.034645756Z time="2020-07-20T08:21:20.034617060Z" level=info msg="loading plugin "io.containerd.grpc.v1.images"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.034722695Z time="2020-07-20T08:21:20.034689037Z" level=info msg="loading plugin "io.containerd.grpc.v1.leases"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.034800005Z time="2020-07-20T08:21:20.034770572Z" level=info msg="loading plugin "io.containerd.grpc.v1.namespaces"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.034873069Z time="2020-07-20T08:21:20.034837050Z" level=info msg="loading plugin "io.containerd.internal.v1.opt"..." type=io.containerd.internal.v1
2020-07-20T08:21:20.036608424Z time="2020-07-20T08:21:20.036525701Z" level=info msg="loading plugin "io.containerd.grpc.v1.snapshots"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.036722927Z time="2020-07-20T08:21:20.036684403Z" level=info msg="loading plugin "io.containerd.grpc.v1.tasks"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.036799326Z time="2020-07-20T08:21:20.036769392Z" level=info msg="loading plugin "io.containerd.grpc.v1.version"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.036876692Z time="2020-07-20T08:21:20.036844684Z" level=info msg="loading plugin "io.containerd.grpc.v1.introspection"..." type=io.containerd.grpc.v1
2020-07-20T08:21:20.037291381Z time="2020-07-20T08:21:20.037244979Z" level=info msg=serving... address="/var/run/docker/containerd/containerd-debug.sock"
2020-07-20T08:21:20.037493736Z time="2020-07-20T08:21:20.037445814Z" level=info msg=serving... address="/var/run/docker/containerd/containerd.sock"
2020-07-20T08:21:20.037563487Z time="2020-07-20T08:21:20.037522305Z" level=info msg="containerd successfully booted in 0.069638s"
2020-07-20T08:21:20.087933162Z time="2020-07-20T08:21:20.087804902Z" level=info msg="Setting the storage driver from the $DOCKER_DRIVER environment variable (overlay2)"
2020-07-20T08:21:20.088415387Z time="2020-07-20T08:21:20.088327506Z" level=info msg="parsed scheme: \"unix\"" module=grpc
2020-07-20T08:21:20.088533804Z time="2020-07-20T08:21:20.088465157Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
2020-07-20T08:21:20.088620947Z time="2020-07-20T08:21:20.088562235Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>}" module=grpc
2020-07-20T08:21:20.088709546Z time="2020-07-20T08:21:20.088654016Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
2020-07-20T08:21:20.092857445Z time="2020-07-20T08:21:20.092749940Z" level=info msg="parsed scheme: \"unix\"" module=grpc
2020-07-20T08:21:20.092962469Z time="2020-07-20T08:21:20.092914347Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
2020-07-20T08:21:20.093060327Z time="2020-07-20T08:21:20.093013905Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>}" module=grpc
2020-07-20T08:21:20.093142744Z time="2020-07-20T08:21:20.093102173Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
2020-07-20T08:21:20.149109416Z time="2020-07-20T08:21:20.148965236Z" level=info msg="Loading containers: start."
2020-07-20T08:21:20.159351905Z time="2020-07-20T08:21:20.159146135Z" level=warning msg="Running modprobe bridge br_netfilter failed with message: ip: can't find device 'bridge'\nbridge 167936 1 br_netfilter\nstp 16384 1 bridge\nllc 16384 2 bridge,stp\nip: can't find device 'br_netfilter'\nbr_netfilter 24576 0 \nbridge 167936 1 br_netfilter\nmodprobe: can't change directory to '/lib/modules': No such file or directory\n, error: exit status 1"
2020-07-20T08:21:20.280536391Z time="2020-07-20T08:21:20.280402152Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.18.0.0/16. Daemon option --bip can be used to set a preferred IP address"
2020-07-20T08:21:20.337028532Z time="2020-07-20T08:21:20.336889956Z" level=info msg="Loading containers: done."
2020-07-20T08:21:20.435200532Z time="2020-07-20T08:21:20.435033092Z" level=info msg="Docker daemon" commit=48a66213fe graphdriver(s)=overlay2 version=19.03.12
2020-07-20T08:21:20.436386855Z time="2020-07-20T08:21:20.436266338Z" level=info msg="Daemon has completed initialization"
2020-07-20T08:21:20.476621441Z time="2020-07-20T08:21:20.475137317Z" level=info msg="API listen on [::]:2375"
2020-07-20T08:21:20.477679219Z time="2020-07-20T08:21:20.477535808Z" level=info msg="API listen on /var/run/docker.sock"
[0;33m*********[0;m
[0KPulling docker image gitlab/dind:latest ...
[0;m[0KUsing docker image sha256:cc674e878f23bdc3c36cc37596d31adaa23bca0fc3ed18bea9b59abc638602e1 for gitlab/dind:latest ...
[0;msection_end:1595233326:prepare_executor
[0Ksection_start:1595233326:prepare_script
[0K[0K[36;1mPreparing environment[0;m
[0;mRunning on runner-fa6cab46-project-18378289-concurrent-0 via runner-fa6cab46-srm-1595233216-1bd30100...
section_end:1595233330:prepare_script
[0Ksection_start:1595233330:get_sources
[0K[0K[36;1mGetting source from Git repository[0;m
[0;m[32;1m$ eval "$CI_PRE_CLONE_SCRIPT"[0;m
[32;1mFetching changes with git depth set to 50...[0;m
Initialized empty Git repository in /builds/xxx.us/backend/.git/
[32;1mCreated fresh repository.[0;m
[32;1mChecking out 257ffdf2 as stage...[0;m
[32;1mSkipping Git submodules setup[0;m
section_end:1595233333:get_sources
[0Ksection_start:1595233333:restore_cache
[0K[0K[36;1mRestoring cache[0;m
[0;m[32;1mChecking cache for stage node:14.5.0-alpine-2...[0;m
Downloading cache.zip from https://storage.googleapis.com/gitlab-com-runners-cache/project/18378289/stage%20node:14.5.0-alpine-2[0;m
[32;1mSuccessfully extracted cache[0;m
section_end:1595233334:restore_cache
[0Ksection_start:1595233334:step_script
[0K[0K[36;1mExecuting "step_script" stage of the job script[0;m
[0;mln: failed to create symbolic link '/sys/fs/cgroup/systemd/name=systemd': Operation not permitted
time="2020-07-20T08:22:14.844844859Z" level=warning msg="[!] DON'T BIND ON ANY IP ADDRESS WITHOUT setting -tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING [!]"
time="2020-07-20T08:22:14.846663310Z" level=info msg="libcontainerd: new containerd process, pid: 57"
time="2020-07-20T08:22:14.906788853Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2020-07-20T08:22:14.907996055Z" level=info msg="Loading containers: start."
time="2020-07-20T08:22:14.910877638Z" level=warning msg="Running modprobe bridge br_netfilter failed with message: modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.78-coreos/modules.dep.bin'\nmodprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.78-coreos/modules.dep.bin'\n, error: exit status 1"
time="2020-07-20T08:22:14.912665866Z" level=warning msg="Running modprobe nf_nat failed with message: `modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.78-coreos/modules.dep.bin'`, error: exit status 1"
time="2020-07-20T08:22:14.914201302Z" level=warning msg="Running modprobe xt_conntrack failed with message: `modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.78-coreos/modules.dep.bin'`, error: exit status 1"
time="2020-07-20T08:22:14.989456423Z" level=warning msg="Could not load necessary modules for IPSEC rules: Running modprobe xfrm_user failed with message: `modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.78-coreos/modules.dep.bin'`, error: exit status 1"
time="2020-07-20T08:22:14.990108153Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.18.0.0/16. Daemon option --bip can be used to set a preferred IP address"
time="2020-07-20T08:22:15.029286773Z" level=info msg="Loading containers: done."
time="2020-07-20T08:22:15.029664106Z" level=info msg="Daemon has completed initialization"
time="2020-07-20T08:22:15.029823541Z" level=info msg="Docker daemon" commit=23cf638 graphdriver=overlay2 version=1.12.1
time="2020-07-20T08:22:15.048665494Z" level=info msg="API listen on /var/run/docker.sock"
time="2020-07-20T08:22:15.049046558Z" level=info msg="API listen on [::]:7070"
# Keeps loading and finally fails after a couple of seconds
gitlab-ci.yml
cache:
key: '$CI_COMMIT_REF_NAME node:14.5.0-alpine'
paths:
- node_modules/
stages:
- release
- deploy
variables:
TAGGED_IMAGE: '$CI_REGISTRY_IMAGE:latest'
.release:
stage: release
image: docker:19.03.12
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
before_script:
- docker version
- docker info
- echo "$CI_JOB_TOKEN" | docker login --username $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
script:
- docker build --pull --tag $TAGGED_IMAGE --cache-from $TAGGED_IMAGE --build-arg NODE_ENV=$CI_ENVIRONMENT_NAME .
- docker push $TAGGED_IMAGE
after_script:
- docker logout $CI_REGISTRY
.deploy:
stage: deploy
image: gitlab/dind:latest
services:
- docker:dind
variables:
DOCKER_COMPOSE_PATH: '~/docker-composes/$CI_PROJECT_PATH/docker-compose.yml'
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$DEPLOY_SERVER_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan $DEPLOYMENT_SERVER_IP >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- rsync -avR --rsync-path="mkdir -p ~/docker-composes/$CI_PROJECT_PATH/; rsync" ./docker-compose.yml root#$DEPLOYMENT_SERVER_IP:~/docker-composes/$CI_PROJECT_PATH/
- ssh root#$DEPLOYMENT_SERVER_IP "echo "$CI_REGISTRY_PASSWORD" | docker login --username $CI_REGISTRY_USER --password-stdin $CI_REGISTRY; docker-compose -f $DOCKER_COMPOSE_PATH rm -f -s -v $CI_COMMIT_REF_NAME; docker pull $TAGGED_IMAGE; docker-compose -f $DOCKER_COMPOSE_PATH up -d $CI_COMMIT_REF_NAME;"
release_stage:
extends: .release
only:
- stage
environment:
name: staging
deploy_stage:
extends: .deploy
only:
- stage
environment:
name: staging
Dockerfile
ARG NODE_ENV
FROM node:14.5.0-alpine
ARG NODE_ENV
ENV NODE_ENV ${NODE_ENV}
# Set working directory
WORKDIR /var/www/
# Install app dependencies
COPY package.json package-lock.json ./
RUN npm ci --silent --only=production
COPY . ./
# Start the application
CMD [ "npm", "run", "start" ]
docker-compose.yml
version: '3.8'
services:
redis-stage:
container_name: redis-stage
image: redis:6.0.5-alpine
ports:
- '7075:6379'
restart: always
networks:
- my-proxy-net
stage:
container_name: xxx-backend-stage
image: registry.gitlab.com/xxx.us/backend:latest
build: .
expose:
- '7070'
restart: always
networks:
- my-proxy-net
depends_on:
- redis-stage
environment:
VIRTUAL_HOST: backend.xxx.us
VIRTUAL_PROTO: https
LETSENCRYPT_HOST: backend.xxx.us
networks:
my-proxy-net:
external:
name: mynetwork
Update 1
I got a warning on the page claims I have used over 30% of my shared runner minutes. Maybe it is about not having enough minutes.
Update 2
The release stage gets completed successfully.
Update 3
Before I get into this problem, I deployed once successfully. I decided to test that commit once again and see if it succeeds, but it fails!
I fixed the issue. In my case, it was PORT (absolutely) and HOST (maybe) environment variables I defined manually in the GitLab CI/CD Variables section. It seems PORT and maybe HOST are two reserved environment variables for GitLab and/or Docker.
By the way, I couldn't find anything in docs state not using those variables names.

Problem installing/running Docker on Ubuntu (dockerd errors) / Daemons running? Kernel upgarde?

I am on Ubuntu 18.04 (running emulated Windows) and am a total newbie. I followed the below steps to install Docker, but can't get it to run.
Commands I used to install (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04):
882 sudo apt update
883 sudo apt install apt-transport-https ca-certificates curl software-properties-common
884 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
885 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
886 sudo apt update
887 apt-cache policy docker-ce
888 sudo apt install docker-ce
889 sudo systemctl status docker
890 sudo /etc/init.d/docker start
So far so good. Now to check whether you can access and download images from Docker Hub, I run:
sudo docker run hello-world
And I get the following error:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
Running sudo dockerd returns:
INFO[2020-02-22T11:09:04.509355900+08:00] Starting up
INFO[2020-02-22T11:09:04.516510800+08:00] libcontainerd: started new containerd process pid=3705
INFO[2020-02-22T11:09:04.516870500+08:00] parsed scheme: "unix" module=grpc
INFO[2020-02-22T11:09:04.517102600+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-02-22T11:09:04.517288800+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-02-22T11:09:04.517495400+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-02-22T11:09:04.547297900+08:00] starting containerd revision=b34a5c8af56e510852c35414db4c1f4fa6172339 version=1.2.10
INFO[2020-02-22T11:09:04.548738200+08:00] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[2020-02-22T11:09:04.548914900+08:00] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1
WARN[2020-02-22T11:09:04.549228300+08:00] failed to load plugin io.containerd.snapshotter.v1.btrfs error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
INFO[2020-02-22T11:09:04.549457200+08:00] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1
WARN[2020-02-22T11:09:04.553575600+08:00] failed to load plugin io.containerd.snapshotter.v1.aufs error="modprobe aufs failed: "modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-17763-Microsoft/modules.dep.bin'\nmodprobe: FATAL: Module aufs not found in directory /lib/modules/4.4.0-17763-Microsoft\n": exit status 1"
INFO[2020-02-22T11:09:04.553871800+08:00] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1
INFO[2020-02-22T11:09:04.554049900+08:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1
INFO[2020-02-22T11:09:04.554470800+08:00] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2020-02-22T11:09:04.554711200+08:00] skip loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2020-02-22T11:09:04.555303000+08:00] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1
WARN[2020-02-22T11:09:04.556436000+08:00] could not use snapshotter btrfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
WARN[2020-02-22T11:09:04.578612300+08:00] could not use snapshotter aufs in metadata plugin error="modprobe aufs failed: "modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-17763-Microsoft/modules.dep.bin'\nmodprobe: FATAL: Module aufs not found in directory /lib/modules/4.4.0-17763-Microsoft\n": exit status 1"
WARN[2020-02-22T11:09:04.585873300+08:00] could not use snapshotter zfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin"
INFO[2020-02-22T11:09:04.597785400+08:00] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1
INFO[2020-02-22T11:09:04.605886800+08:00] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1
INFO[2020-02-22T11:09:04.609171800+08:00] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.628196600+08:00] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.645164600+08:00] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.664083400+08:00] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.670739700+08:00] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.689722900+08:00] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.705680600+08:00] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.724497600+08:00] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1
INFO[2020-02-22T11:09:04.743291500+08:00] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2
INFO[2020-02-22T11:09:04.747424800+08:00] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1
INFO[2020-02-22T11:09:04.767781500+08:00] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.783546000+08:00] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1
INFO[2020-02-22T11:09:04.803609700+08:00] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.806843900+08:00] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.824845300+08:00] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.825514100+08:00] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.844268300+08:00] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.862309200+08:00] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.868008900+08:00] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.868593000+08:00] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.887239600+08:00] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1
INFO[2020-02-22T11:09:04.904976000+08:00] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.909043500+08:00] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.926997400+08:00] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.927696200+08:00] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.964084500+08:00] serving... address="/var/run/docker/containerd/containerd-debug.sock"
INFO[2020-02-22T11:09:04.976438300+08:00] serving... address="/var/run/docker/containerd/containerd.sock"
INFO[2020-02-22T11:09:04.995872500+08:00] containerd successfully booted in 0.449319s
INFO[2020-02-22T11:09:05.008892100+08:00] parsed scheme: "unix" module=grpc
INFO[2020-02-22T11:09:05.011750500+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-02-22T11:09:05.033549900+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-02-22T11:09:05.051284400+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-02-22T11:09:05.055568500+08:00] parsed scheme: "unix" module=grpc
INFO[2020-02-22T11:09:05.055766700+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-02-22T11:09:05.073081000+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-02-22T11:09:05.090749400+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-02-22T11:09:05.104871000+08:00] [graphdriver] using prior storage driver: overlay2
WARN[2020-02-22T11:09:05.152741200+08:00] Your kernel does not support cgroup memory limit
WARN[2020-02-22T11:09:05.153377200+08:00] Unable to find cpu cgroup in mounts
WARN[2020-02-22T11:09:05.153980700+08:00] Unable to find blkio cgroup in mounts
WARN[2020-02-22T11:09:05.154573200+08:00] Unable to find cpuset cgroup in mounts
WARN[2020-02-22T11:09:05.155169600+08:00] mountpoint for pids not found
INFO[2020-02-22T11:09:05.155932100+08:00] Loading containers: start.
WARN[2020-02-22T11:09:05.160351700+08:00] Running iptables --wait -t nat -L -n failed with message: `iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.`, error: exit status 3
INFO[2020-02-22T11:09:05.234905500+08:00] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby
INFO[2020-02-22T11:09:05.235118300+08:00] stopping healthcheck following graceful shutdown module=libcontainerd
INFO[2020-02-22T11:09:05.235126900+08:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
(exit status 3)
I am totally lost here and lack the background to fix what's wrong - I am taking a web dev class and it's a requirement for a lot of the stuff/exercises. Thank you!
You cannot run Docker under Windows Subsystem for Linux. Docker depends on many Linux kernel features which WSL has not implemented. Your uname looks like this from a comment:
Linux DESKTOP-CD69S60 4.4.0-17763-Microsoft #864-Microsoft Thu Nov 07 15:22:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
The 17763-Microsoft is the key part - this means you're not actually running the Linux kernel, but instead are running the WSL kernel (which is an approximation of Linux on top of Windows NT).
You need to either use WSL2 (which runs a real virtual machine instead of a partially Linux compatible kernel) or another virtualization technology like VMware, Hyper-V, or VirtualBox. If you install Hyper-V, both VMware and VirtualBox become non-options due to how Hyper-V works, so you'll need something like Hyper-V Switcher to turn it off if you find that Hyper-V doesn't satisfy your needs (and then other virtualization technology will work).
You will have to add the user to the docker group.
Example:
usermod -g docker username
Then, you will be able to connect.

Docker daemon killed shorty after start

I have a server running Ubuntu 18.04.2 LTS with the latest updates. I installed docker-ce using the repo using the tutorial from https://docs.docker.com/install/linux/docker-ce/ubuntu/
A short time after being started, the docker daemon is killed somehow. To debug, I ran
/usr/bin/dockerd
as root to get a log output:
root#hostname ~ # /usr/bin/dockerd
INFO[2019-02-21T17:20:15.233508941+01:00] systemd-resolved is running, so using resolvconf: /run/systemd/resolve/resolv.conf
INFO[2019-02-21T17:20:15.235533437+01:00] parsed scheme: "unix" module=grpc
INFO[2019-02-21T17:20:15.235562227+01:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2019-02-21T17:20:15.235594491+01:00] parsed scheme: "unix" module=grpc
INFO[2019-02-21T17:20:15.235601292+01:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2019-02-21T17:20:15.239064773+01:00] ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 <nil>}] module=grpc
INFO[2019-02-21T17:20:15.239098425+01:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2019-02-21T17:20:15.239155494+01:00] pickfirstBalancer: HandleSubConnStateChange: 0xc42018d430, CONNECTING module=grpc
INFO[2019-02-21T17:20:15.239321579+01:00] pickfirstBalancer: HandleSubConnStateChange: 0xc42018d430, READY module=grpc
INFO[2019-02-21T17:20:15.240106192+01:00] ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 <nil>}] module=grpc
INFO[2019-02-21T17:20:15.240142826+01:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2019-02-21T17:20:15.240193046+01:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4207c2120, CONNECTING module=grpc
INFO[2019-02-21T17:20:15.240315657+01:00] pickfirstBalancer: HandleSubConnStateChange: 0xc4207c2120, READY module=grpc
INFO[2019-02-21T17:20:15.243221391+01:00] [graphdriver] using prior storage driver: overlay2
INFO[2019-02-21T17:20:15.275042317+01:00] Graph migration to content-addressability took 0.00 seconds
WARN[2019-02-21T17:20:15.275313782+01:00] Your kernel does not support swap memory limit
WARN[2019-02-21T17:20:15.275355076+01:00] Your kernel does not support cgroup rt period
WARN[2019-02-21T17:20:15.275369332+01:00] Your kernel does not support cgroup rt runtime
INFO[2019-02-21T17:20:15.275785076+01:00] Loading containers: start.
INFO[2019-02-21T17:20:16.335203892+01:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2019-02-21T17:20:16.683066803+01:00] Loading containers: done.
INFO[2019-02-21T17:20:16.835625998+01:00] Docker daemon commit=6247962 graphdriver(s)=overlay2 version=18.09.2
INFO[2019-02-21T17:20:16.835701364+01:00] Daemon has completed initialization
INFO[2019-02-21T17:20:16.842961863+01:00] API listen on /var/run/docker.sock
Killed
As you can see, there are two warnings (I think they are irrelevant) and one message about the killing in the end. The runtime of the daemon was about a minute.
I had docker installed previously on this machine (using docker.io), but I apt purged all packets, deleted all docker-related files in /var, /etc and /home and /run and performed a system-wide search for any file with *docker* in it. The issue still persists. How can I further debug and find out why the docker daemon is killed all the time?
Check /var/log/kern.log to see what reason docker daemon was killed. If it's about the OOM-killer (out-of-memory killer) triggered, you don't have enough memory on the system. Add more RAM or swap memory.

Installation of Docker on Debian 8

Installation with apt-get -y install docker-engine as described in https://docs.docker.com/engine/installation/linux/debian/ fails with
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
systemctl status docker.service gives
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled)
Active: failed (Result: exit-code) since Sun 2017-02-19 11:03:55 CET; 1min 22s ago
Docs: https://docs.docker.com
Main PID: 5157 (code=exited, status=1/FAILURE)
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: time="2017-02-19T11:03:55.594281147+01:00" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded."
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: time="2017-02-19T11:03:55.595650295+01:00" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded."
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: time="2017-02-19T11:03:55.640984406+01:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: time="2017-02-19T11:03:55.642147968+01:00" level=warning msg="Your kernel does not support oom control"
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: time="2017-02-19T11:03:55.642181377+01:00" level=warning msg="Your kernel does not support memory swappiness"
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: time="2017-02-19T11:03:55.642199036+01:00" level=warning msg="Your kernel does not support kernel memory limit"
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: time="2017-02-19T11:03:55.642215415+01:00" level=warning msg="Unable to find cpu cgroup in mounts"
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: time="2017-02-19T11:03:55.642262936+01:00" level=warning msg="Unable to find cpuset cgroup in mounts"
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: time="2017-02-19T11:03:55.642312565+01:00" level=warning msg="mountpoint for pids not found"
Feb 19 11:03:55 v72089.1blu.de dockerd[5157]: Error starting daemon: Devices cgroup isn't mounted
The overlay module seems not to be installed on my distribution (it is a hosted virtual server).
uname -r
3.16.0-042stab120.11
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.7 (jessie)
Release: 8.7
Codename: jessie
Updating the kernel (https://backports.debian.org/Instructions/) with apt-get install -t jessie-backports linux-image-amd64 installs the overlay module in /lib/modules/4.9.0-0.bpo.1-amd64/kernel/fs/overlayfs/overlay.ko but this still doesn't allow me to install docker, I get the same error as mentioned above.
Edit: This is what docker version tells me
Client:
Version: 1.13.1
API version: 1.26
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 06:36:34 2017
OS/Arch: linux/amd64
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Edit 2: I have no problem with Docker on my Mac in VirtualBox Debian Jessie, that is why I think it is about the Debian distribution. One difference I found was that in the VB Debian there is storage driver "aufs" installed, in the hosted one, neither "aufs" nor "overlay".
Any ideas here? What can I do?
PS: I don't think the problem is related to that question error starting docker daemon on ubuntu 14.04 (Devices cgroup isn't mounted) as they don't have a storage driver problem.
Edit 3:
I tried this:
root#v72089:~# cat /etc/systemd/system/docker.service.d/00-execstart.conf
ExecStart=/usr/bin/dockerd -H fd:// --storage-driver aufs
root#v72089:~# systemctl daemon-reload && systemctl start docker
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
root#v72089:~# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─00-execstart.conf
Active: failed (Result: exit-code) since Mon 2017-02-20 09:38:53 CET; 9s ago
Docs: https://docs.docker.com
Process: 29655 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
Main PID: 29655 (code=exited, status=1/FAILURE)
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: time="2017-02-20T09:38:53.185963477+01:00" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded."
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: time="2017-02-20T09:38:53.187730948+01:00" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded."
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: time="2017-02-20T09:38:53.192048419+01:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: time="2017-02-20T09:38:53.192821521+01:00" level=warning msg="Your kernel does not support oom control"
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: time="2017-02-20T09:38:53.192846291+01:00" level=warning msg="Your kernel does not support memory swappiness"
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: time="2017-02-20T09:38:53.192862149+01:00" level=warning msg="Your kernel does not support kernel memory limit"
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: time="2017-02-20T09:38:53.192872455+01:00" level=warning msg="Unable to find cpu cgroup in mounts"
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: time="2017-02-20T09:38:53.192908839+01:00" level=warning msg="Unable to find cpuset cgroup in mounts"
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: time="2017-02-20T09:38:53.192954496+01:00" level=warning msg="mountpoint for pids not found"
Feb 20 09:38:53 v72089.1blu.de dockerd[29655]: Error starting daemon: Devices cgroup isn't mounted
root#v72089:~# dockerd --storage-driver overlay
INFO[0000] libcontainerd: new containerd process, pid: 29703
ERRO[0001] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.
Error starting daemon: error initializing graphdriver: driver not supported
root#v72089:~# find / -name overlay*
/lib/modules/4.9.0-0.bpo.1-amd64/kernel/fs/overlayfs
/lib/modules/4.9.0-0.bpo.1-amd64/kernel/fs/overlayfs/overlay.ko
root#v72089:~# dockerd --storage-driver aufs
INFO[0000] libcontainerd: new containerd process, pid: 29735
Error starting daemon: error initializing graphdriver: driver not supported
root#v72089:~# dockerd --storage-driver devicemapper
INFO[0000] libcontainerd: new containerd process, pid: 29785
Error starting daemon: error initializing graphdriver: driver not supported
To switch to another storage driver, you can add --storage-driver aufs to the dockerd startup command. With systemd, I believe you can simply run this as root:
mkdir -p /etc/systemd/system/docker.service.d
echo "ExecStart=/usr/bin/dockerd -H fd:// --storage-driver aufs" >/etc/systemd/system/docker.service.d/00-execstart.conf
Then systemctl daemon-reload && systemctl start docker. For the cgroups warnings, the linked answer for ubuntu should help. 3.16 is one of the first kernels docker supported, so not all of the features will be available with this kernel.
What finally solved my issue: talking with the host of the server. They seemed to use a different kernel that made it impossible to install Docker. I changed the server at the same host and everything worked fine.

Resources