Skip to contentSkip to conversation

Problem with docker, iptables and meta-virtualisation

DISCUSSION Ketterle, Peer 2 participants 2 messages Sep 17, 2019

lore
Share & tools
lore
#0 lore raw

Hello!

I am sorry, I don't know where to ask, so I'm writing this e-mail. If there is a place like a forum or something like that to better ask for help, please show me where to go.

I am new to yocto, so maybe I am just doing something pretty dumb but I cannot find out right now what the problem is.

So, now for my problem. I want to build a yocto for an amd64 with azure-iot support. For this I need meta-virtualisation. I tried the warrior branch first, then the thud branch, both got the same result in this regard. So I believe it has nothing to do with the exact branch. I got the image to build, but when I run it, dockerd is not working. I can start it but it fails with a problem with iptables, see attachment.
I have also attached the local.conf and the bblayers.conf as well as the output of the bitbake-command.

Do you have an idea what I am doing wrong? Or maybe there is a simple preset of conf-files which works from where I could go on.

Thanks a lot for your help!

Best regards,

Peer

INFO[2019-09-17T12:24:30.509400666Z] libcontainerd: started new containerd process pid=797
INFO[2019-09-17T12:24:30.509542706Z] parsed scheme: "unix" module=grpc
INFO[2019-09-17T12:24:30.509552913Z] scheme "unix" not registered, fallback to default scheme module=grpc INFO[2019-09-17T12:24:30.509590744Z] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] module=grpc INFO[2019-09-17T12:24:30.509649692Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2019-09-17T12:24:30.509772331Z] pickfirstBalancer: HandleSubConnStateChange: 0xc0007090b0, CONNECTING module=grpc
INFO[0000] starting containerd module=containerd revision=cfd04396dc68220d1cecbe686a6cc3aa5ce3667c.m version=v1.0.2.m
INFO[0000] loading plugin "io.containerd.content.v1.content"... module=containerd type=io.containerd.content.v1
INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"... module=containerd type=io.containerd.snapshotter.v1
INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"... module=containerd type=io.containerd.metadata.v1
INFO[0000] loading plugin "io.containerd.differ.v1.walking"... module=containerd type=io.containerd.differ.v1
INFO[0000] loading plugin "io.containerd.gc.v1.scheduler"... module=containerd type=io.containerd.gc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.containers"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.content"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.diff"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.events"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.healthcheck"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.images"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.leases"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.namespaces"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.snapshots"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.monitor.v1.cgroups"... module=containerd type=io.containerd.monitor.v1
INFO[0000] loading plugin "io.containerd.runtime.v1.linux"... module=containerd type=io.containerd.runtime.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.tasks"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.version"... module=containerd type=io.containerd.grpc.v1
INFO[0000] loading plugin "io.containerd.grpc.v1.introspection"... module=containerd type=io.containerd.grpc.v1

INFO[0000] serving...                                    address="/var/run/docker/containerd/containerd-debug.sock" module="containerd/debug"
INFO[0000] serving...                                    address="/var/run/docker/containerd/containerd.sock" module="containerd/grpc"
INFO[0000] containerd successfully booted in 0.007516s   module=containerd

INFO[2019-09-17T12:24:30.552489446Z] pickfirstBalancer: HandleSubConnStateChange: 0xc0007090b0, READY module=grpc
INFO[2019-09-17T12:24:30.555204414Z] parsed scheme: "unix" module=grpc
INFO[2019-09-17T12:24:30.555602337Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2019-09-17T12:24:30.555635230Z] parsed scheme: "unix" module=grpc
INFO[2019-09-17T12:24:30.555640975Z] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2019-09-17T12:24:30.556735282Z] [graphdriver] using prior storage driver: overlay2
INFO[2019-09-17T12:24:30.557503282Z] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] module=grpc
INFO[2019-09-17T12:24:30.557912944Z] ClientConn switching balancer to "pick_first" module=grpc
INFO[2019-09-17T12:24:30.558176647Z] pickfirstBalancer: HandleSubConnStateChange: 0xc000134a50, CONNECTING module=grpc
INFO[2019-09-17T12:24:30.559029148Z] pickfirstBalancer: HandleSubConnStateChange: 0xc000134a50, READY module=grpc
INFO[2019-09-17T12:24:30.559437296Z] Graph migration to content-addressability took 0.00 seconds
WARN[2019-09-17T12:24:30.560082157Z] Your kernel does not support cgroup cfs period
INFO[2019-09-17T12:24:30.557774580Z] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] module=grpc
WARN[2019-09-17T12:24:30.560431279Z] Your kernel does not support cgroup cfs quotas
WARN[2019-09-17T12:24:30.561229740Z] Your kernel does not support cgroup blkio weight
WARN[2019-09-17T12:24:30.561661845Z] Your kernel does not support cgroup blkio weight_device
WARN[2019-09-17T12:24:30.562104000Z] Your kernel does not support cgroup blkio throttle.read_bps_device
WARN[2019-09-17T12:24:30.562593942Z] Your kernel does not support cgroup blkio throttle.write_bps_device
WARN[2019-09-17T12:24:30.562996521Z] Your kernel does not support cgroup blkio throttle.read_iops_device
INFO[2019-09-17T12:24:30.560817751Z] ClientConn switching balancer to "pick_first" module=grpc
WARN[2019-09-17T12:24:30.563371416Z] Your kernel does not support cgroup blkio throttle.write_iops_device
INFO[2019-09-17T12:24:30.564820489Z] Loading containers: start.
WARN[2019-09-17T12:24:30.566215840Z] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/4.18.22-yocto-standard
, error: exit status 1
INFO[2019-09-17T12:24:30.563654161Z] pickfirstBalancer: HandleSubConnStateChange: 0xc000135180, CONNECTING module=grpc
INFO[2019-09-17T12:24:30.567468056Z] pickfirstBalancer: HandleSubConnStateChange: 0xc000135180, READY module=grpc
WARN[2019-09-17T12:24:30.596609299Z] Could not load necessary modules for IPSEC rules: Running modprobe xfrm_user failed with message: modprobe: WARNING: Module xfrm_user not found in directory /lib/modules/4.18.22-yocto-standard, error: exit status 1 WARN[2019-09-17T12:24:30.598719365Z] Could not load necessary modules for Conntrack: Running modprobe nf_conntrack_netlink failed with message: modprobe: WARNING: Module nf_conntrack_netlink not found in directory /lib/modules/4.18.22-yocto-standard, error: exit status 1 INFO[2019-09-17T12:24:30.598899207Z] 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
ERRO[2019-09-17T12:24:30.609475085Z] failed to get event error="rpc error: code = Unavailable desc = transport is closing" module=libcontainerd namespace=moby
INFO[2019-09-17T12:24:30.609560948Z] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby
INFO[2019-09-17T12:24:30.610798268Z] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
INFO[2019-09-17T12:24:30.610819302Z] stopping healthcheck following graceful shutdown module=libcontainerd
INFO[2019-09-17T12:24:30.611158934Z] pickfirstBalancer: HandleSubConnStateChange: 0xc000135180, TRANSIENT_FAILURE module=grpc
INFO[2019-09-17T12:24:30.611221432Z] pickfirstBalancer: HandleSubConnStateChange: 0xc000135180, CONNECTING module=grpc
failed to start daemon: Error initializing network controller: Error creating default "bridge" network: Failed to program NAT chain: Failed to inject DOCKER in PREROUTING chain: iptables failed: iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER: iptables: No chain/target/match by that name.
(exit status 1)

bitbake core-image-full-cmdline
Parsing recipes: 100% |#####################################################################################################################################################################| Time: 0:03:50 Parsing of 2203 .bb files complete (0 cached, 2203 parsed). 3168 targets, 81 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:

BB_VERSION           = "1.40.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "genericx86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "2.6.3"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""

meta
meta-poky
meta-yocto-bsp = "thud:e6949336479e611a142834b6d9241514cbaeaf80"
meta-oe
meta-python
meta-networking
meta-filesystems = "thud:2d088d252624b19df384aecc434d23afb636178f"
meta-virtualization = "thud:7685c7d415e0002c448007960837ae8898cd57a5"

Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:08 Sstate summary: Wanted 175 Found 173 Missed 2 Current 1154 (98% match, 99% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 4555 tasks of which 4542 didn't need to be rerun and all succeeded.

#1 lore raw
Quoted 15 lines · Peer

Hello!

I am sorry, I don’t know where to ask, so I’m writing this e-mail. If there is a place like a forum or something like that to better ask for help, please show me where to go.

I am new to yocto, so maybe I am just doing something pretty dumb but I cannot find out right now what the problem is.

So, now for my problem. I want to build a yocto for an amd64 with azure-iot support. For this I need meta-virtualisation. I tried the warrior branch first, then the thud branch, both got the same result in this regard. So I believe it has nothing to do with the exact branch.

Quoted 8 lines

I got the image to build, but when I run it, dockerd is not working. I can start it but it fails with a problem with iptables, see attachment.

I have also attached the local.conf and the bblayers.conf as well as the output of the bitbake-command.

Do you have an idea what I am doing wrong? Or maybe there is a simple preset of conf-files which works from where I could go on.

Two things jump to mind for me.

- Can you check that the "kernel-modules" package is installed in the image type you are using ? I did a quick glance at core-image-full-cmdline and didn't see it, but I didn't chase down all the includes (or fire up a build to check the package install list)

- Are you using systemd as your init manager ? I know that I haven't tested sysvinit myself for some time, so there may be bitrot there.

Bruce

Quoted 19 lines

Thanks a lot for your help!

Best regards,

Peer

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II