0

when I am using this command to start dockerd in Raspberry Pi 4, it shows me this error:

raspberrypi% sudo dockerd
INFO[2020-07-26T18:41:15.229201974+08:00] Starting up                                  
INFO[2020-07-26T18:41:15.232284275+08:00] parsed scheme: "unix"                         module=grpc
INFO[2020-07-26T18:41:15.232347219+08:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2020-07-26T18:41:15.232413200+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <nil>}] <nil>}  module=grpc
INFO[2020-07-26T18:41:15.232450033+08:00] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2020-07-26T18:41:15.234828378+08:00] parsed scheme: "unix"                         module=grpc
INFO[2020-07-26T18:41:15.234934914+08:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2020-07-26T18:41:15.234993914+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0  <nil>}] <nil>}  module=grpc
INFO[2020-07-26T18:41:15.235048172+08:00] ClientConn switching balancer to "pick_first"  module=grpc
ERRO[2020-07-26T18:41:15.243143273+08:00] failed to mount overlay: no such device       storage-driver=overlay2
ERRO[2020-07-26T18:41:15.252902246+08:00] AUFS was not found in /proc/filesystems       storage-driver=aufs
ERRO[2020-07-26T18:41:15.259121107+08:00] failed to mount overlay: no such device       storage-driver=overlay
WARN[2020-07-26T18:41:15.275937636+08:00] Your kernel does not support swap memory limit 
WARN[2020-07-26T18:41:15.275994209+08:00] Your kernel does not support cgroup cfs period 
WARN[2020-07-26T18:41:15.276022875+08:00] Your kernel does not support cgroup cfs quotas 
WARN[2020-07-26T18:41:15.276049431+08:00] Your kernel does not support cgroup rt period 
WARN[2020-07-26T18:41:15.276075449+08:00] Your kernel does not support cgroup rt runtime 
INFO[2020-07-26T18:41:15.276550759+08:00] Loading containers: start.                   
WARN[2020-07-26T18:41:15.287555903+08:00] Running modprobe bridge br_netfilter failed with message: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.97-v7l+/modules.dep.bin'
modprobe: WARNING: Module bridge not found in directory /lib/modules/4.19.97-v7l+
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.97-v7l+/modules.dep.bin'
modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/4.19.97-v7l+
, error: exit status 1 
WARN[2020-07-26T18:41:15.428797118+08:00] Running iptables --wait -t nat -L -n failed with message: `iptables v1.8.2 (nf_tables):  CHAIN_ADD failed (No such file or directory): chain PREROUTING`, error: exit status 4 
INFO[2020-07-26T18:41:15.981245605+08:00] stopping event stream following graceful shutdown  error="<nil>" module=libcontainerd namespace=moby
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.2 (nf_tables):  CHAIN_ADD failed (No such file or directory): chain PREROUTING
 (exit status 4)

what should I do to fix this problem? This is my docker install commamd:

sudo apt-get update && sudo apt-get upgrade
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh --mirror Aliyun
sudo apt install docker
sudo usermod -aG docker pi

this is my Raspberry Pi kernel version:

raspberrypi% uname -a
Linux raspberrypi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux
  • 1
    If you install docker with apt there is a good chance that docker will be started when the raspi boots. Even apt should start docker after installation. Try e.g. docker ps to check if docker works. – Peter Paul Kiefer Jul 26 '20 at 11:00
  • not running.raspberrypi% sudo docker ps Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? @PeterPaulKiefer – Dolphin Jul 26 '20 at 11:04
  • 1
    Are you sure that your user is Piwith a capital P? usernames are case sensitive. But this should not deny the starting of dockerd, it just allows you to use docker as a normal user. [I used: sudo usermod -aG docker pi on my raspis]. After logout and login again the docker command can be run from the pi user without sudo. Try ps -ef | grep dockerd to be sure that the dockerd is not running. – Peter Paul Kiefer Jul 26 '20 at 11:14
  • I changed the user to pi and relogin , it still not work.@PeterPaulKiefer my kernel support docker obviously. – Dolphin Jul 26 '20 at 11:18
  • 1
    It is more important to find out, whether docker is running so please what is the output of ps -ef | grep dockerd? If it is not running, you have to start it manually. Then you have to use the systemctl command or the initd-commands. That depends on your linux version. if systemd is installed the journalctl command tells you why a module could not be started. On a initd system you have the syslog files in /var/log/. Perhaps they contain some infos. – Peter Paul Kiefer Jul 26 '20 at 11:24
0

it needs to open cgroup in kernel level of Raspberry pi, I add cgroup config to the kernel by modify cmdline.txt:

cgroup_enable=memory cgroup_memory=1 swapaccount=1

and this is my full config:

raspberrypi% cat /boot/cmdline.txt 
console=serial0,115200 console=tty1 root=PARTUUID=ea7d04d6-02 rootfstype=ext4 elevator=deadline fsck.repair=yes cgroup_enable=memory cgroup_memory=1 swapaccount=1 rootwait quiet splash plymouth.ignore-serial-consoles

this is the page I am conference.

  • So this solves your problem? – Dirk Jul 26 '20 at 16:44
  • yes,solve my problem.@Dirk – Dolphin Jul 26 '20 at 16:55
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Jul 29 '20 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.