11

I recently had a problem with my raspbian installation. Probably some upgrade messed up my SSD boot. After resolving it, I noticed that docker.service refuses to start. On the service's log it says

Apr 23 19:24:08 raspberrypi systemd[1]: Starting Docker Application Container Engine...
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.702984211+01:00" level=info msg="Starting up"
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.706657044+01:00" level=info msg="parsed scheme: \"unix\"" module=grpc
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.707181266+01:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.707520970+01:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.707855840+01:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.711273840+01:00" level=info msg="parsed scheme: \"unix\"" module=grpc
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.711450507+01:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.711545396+01:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.711626674+01:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.721460748+01:00" level=error msg="failed to mount overlay: no such device" storage-driver=overlay2
Apr 23 19:24:08 raspberrypi dockerd[1629]: time="2020-04-23T19:24:08.721569822+01:00" level=error msg="[graphdriver] prior storage driver overlay2 failed: driver not supported"
Apr 23 19:24:08 raspberrypi dockerd[1629]: failed to start daemon: error initializing graphdriver: driver not supported
Apr 23 19:24:08 raspberrypi systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Apr 23 19:24:08 raspberrypi systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 23 19:24:08 raspberrypi systemd[1]: Failed to start Docker Application Container Engine.

I wasn't able to find anything relevant online. Ideally I would like to avoid losing my docker images

Edit: The kernel version was 4.19.114-v7l+, however there were no modules installed for this kernel under /lib/module. Running a "sudo apt install --reinstall raspberrypi-bootloader raspberrypi-kernel" fixed it.

user13394025
  • 161
  • 1
  • 2
  • 5
  • This question would be more appropriate for https://raspberrypi.stackexchange.com/. Some diagnostics to include in your question: What kernel version are you running (`uname -r`)? Is there a directory matching your kernel version in `/lib/modules`? What happens when you try to run `modprobe overlay`? – larsks Apr 23 '20 at 20:40
  • The kernel version is 4.19.114-v7l+ There is no directory matching this version no (!) Running modprobe returns with ` modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.114-v7l+/modules.dep.bin' modprobe: FATAL: Module overlay not found in directory /lib/modules/4.19.114-v7l+ ` – user13394025 Apr 23 '20 at 21:00
  • no wonder wh it can't find the module! – user13394025 Apr 23 '20 at 21:04
  • Sounds like you're on the right track. But you'll still want to post the question elsewhere, since it's off topic here on Stack Overflow, and include that information in the question itself. – larsks Apr 23 '20 at 21:05
  • no that was it. I completely overlooked it and didn't check it. Now it works. Thanks – user13394025 Apr 23 '20 at 21:35

3 Answers3

3

In case you have an old kernel, update the kernel.

Check if modules are installed for the kernel under /lib/module.

sudo apt install --reinstall raspberrypi-bootloader raspberrypi-kernel

should fix it.

I had the same problem in a VM on a Xen host, and fixed it by installing pygrub and its own kernel inside the VM: https://stackoverflow.com/a/71763164/1069083

rubo77
  • 19,527
  • 31
  • 134
  • 226
3

You might have made a kernel update and need to reboot in order to use the new kernel instead of the old one.

Arne L.
  • 2,194
  • 19
  • 19
1

Your kernel might not support overlayl2:

  1. Try to upgrade your kernel (check if it has support for overlay2)
  2. Or use another driver like aufs or devicemapper for Debian > 9, and overlay for Ubuntu.

NB.: devicemapper is tagged as deprecated for Docker.

https://docs.docker.com/storage/storagedriver/select-storage-driver/

After your changes, you also might have to remove /var/lib/docker before restarting the service.

Good luck !