I am having trouble starting the docker containers on a particular machine: doing docker run gives random results, and that is the case whether I install atom, debian stretch of ubuntu 18.04. On the debian OSes, I am using a fresh install of Docker version 18.09.6, build 481bc77.
The most common issue is Error response from daemon: OCI runtime create failed
Here is what I see when I am trying to run the hello-world example (working ~1.5 times out of 7 times):
user#machine:~$ sudo docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
user#machine:~$ sudo docker run hello-world
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v1.linux/moby/02c7ab23649c89b19720d57a549eb703aa442805aa3b468e7610c19e6d8fa2eb/log.json: no such file or directory): runc did not terminate sucessfully: unknown.
ERRO[0001] error waiting for container: context canceled
user#machine:~$ sudo docker run hello-world
docker: Error response from daemon: ttrpc: client shutting down: read unix #->#/containerd-shim/moby/4de0da9c33103f4622907a3ab25535075325366e9a4d0f1c4849ec20ca3cb91f/shim.sock: read: connection reset by peer: unknown.
ERRO[0001] error waiting for container: context canceled
user#machine:~$ sudo docker run hello-world
docker: Error response from daemon: ttrpc: client shutting down: read unix #->#/containerd-shim/moby/151f1ba68a9b28260a00e9cff433c5009382880fb75a28ee79fa549ffdfb21a9/shim.sock: read: connection reset by peer: unknown.
ERRO[0001] error waiting for container: context canceled
user#machine:~$ sudo docker run hello-world
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v1.linux/moby/32de5ca60771884d4a236e3e9d2704a48f18f03e93fc6dd195f4e39fb7b56501/log.json: no such file or directory): runc did not terminate sucessfully: unknown.
ERRO[0001] error waiting for container: context canceled
user#machine:~$ sudo docker run hello-world
docker: Error response from daemon: ttrpc: client shutting down: read unix #->#/containerd-shim/moby/dcbb905d8783c65302c1a3afe8fb7913c58e7d5765b5a79072d55fb36f7bc1ea/shim.sock: read: connection reset by peer: unknown.
ERRO[0001] error waiting for container: context canceled
user#machine:~$ sudo docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
docker: Error response from daemon: OCI runtime state failed: runc did not terminate sucessfully: SIGILL: illegal instruction
PC=0x55611122e30c m=3 sigcode=2
goroutine 20 [running]:
runtime.aeshashbody()
/.GOROOT/src/runtime/asm_amd64.s:939 +0x1c fp=0xc42002d6b8 sp=0xc42002d6b0 pc=0x55611122e30c
runtime.mapaccess1_faststr(0x556111a6ad00, 0xc42007f590, 0x5561116ceb02, 0x2, 0x556100000001)
/.GOROOT/src/runtime/hashmap_fast.go:233 +0x1d1 fp=0xc42002d728 sp=0xc42002d6b8 pc=0x5561111e3031
text/template/parse.lexIdentifier(0xc4200bab60, 0x556111ae6e70)
/.GOROOT/src/text/template/parse/lex.go:441 +0x138 fp=0xc42002d7b8 sp=0xc42002d728 pc=0x556111415128
text/template/parse.(*lexer).run(0xc4200bab60)
/.GOROOT/src/text/template/parse/lex.go:228 +0x39 fp=0xc42002d7d8 sp=0xc42002d7b8 pc=0x556111413f99
runtime.goexit()
/.GOROOT/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc42002d7e0 sp=0xc42002d7d8 pc=0x55611122f3b1
created by text/template/parse.lex
/.GOROOT/src/text/template/parse/lex.go:221 +0x161
goroutine 1 [chan receive, locked to thread]:
text/template/parse.(*lexer).nextItem(...)
/.GOROOT/src/text/template/parse/lex.go:195
text/template/parse.(*Tree).next(...)
/.GOROOT/src/text/template/parse/parse.go:64
text/template/parse.(*Tree).nextNonSpace(0xc42009a200, 0x0, 0x0, 0x0, 0x0, 0x0)
/.GOROOT/src/text/template/parse/parse.go:102 +0x159
text/template/parse.(*Tree).parse(0xc42009a200)
/.GOROOT/src/text/template/parse/parse.go:284 +0x2fa
text/template/parse.(*Tree).Parse(0xc42009a200, 0x5561116cead5, 0xf0, 0x0, 0x0, 0x0, 0x0, 0xc42007f800, 0xc42007c6c0, 0x2, ...)
/.GOROOT/src/text/template/parse/parse.go:233 +0x228
text/template/parse.Parse(0x5561116b62fb, 0x5, 0x5561116cead5, 0xf0, 0x0, 0x0, 0x0, 0x0, 0xc42007c6c0, 0x2, ...)
/.GOROOT/src/text/template/parse/parse.go:55 +0x10a
text/template.(*Template).Parse(0xc42008c240, 0x5561116cead5, 0xf0, 0x5561112abfaa, 0x5561116c0486, 0x1d)
/.GOROOT/src/text/template/template.go:198 +0x11a
rax 0x5561116ceb02
rbx 0x55611122e2d0
rcx 0x2
rdx 0xc42002d6c8
rdi 0xc6b7000000000000
rsi 0x1
rbp 0xc42002d718
rsp 0xc42002d6b0
r8 0xc42002d728
r9 0x0
r10 0x3
r11 0x286
r12 0xc42006e468
r13 0xff
r14 0xff
r15 0xf
rip 0x55611122e30c
rflags 0x10202
cs 0x33
fs 0x0
gs 0x0
: unknown.
ERRO[0002] error waiting for container: context canceled
Does anyone know what the error could be?
I had some some weird networking errors when installing docker, but launching the same apt install again worked:
user#machine:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
aufs-tools cgroupfs-mount libltdl7 pigz
The following NEW packages will be installed:
aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli libltdl7 pigz
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.7 MB of archives.
After this operation, 243 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 pigz amd64 2.4-1 [57.4 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic/universe amd64 aufs-tools amd64 1:4.9+20170918-1ubuntu1 [104 kB]
E: Method https has died unexpectedly!
E: Sub-process https received signal 4.
If you are facing issues after the upgrade to containerd 1.4.0, downgrade to 1.3.4.
That is, for example, if you are on Arch Linux, probably you can do:
cd /var/cache/pacman/pkg/
sudo pacman -U containerd-1.3.4-2-x86_64.pkg.tar.zst
Specifically, this is the error message you might be facing:
docker: Error response from daemon: ttrpc: closed: unknown.
If you need 1.4.0 for some reason, there is an open issue tracking this issue on Github over here, best to track it's status from there: https://github.com/containerd/containerd/issues/4483
Related
I am getting error as error creating overlay mount to /var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/merged
Please find debug info below.
OS
root#cks-master:/vagrant/files# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
Dockerfile
# cat ch5Dockerfile
FROM bash
CMD ["ping", "killer.sh"]
Build log
root#cks-master:/vagrant/files# podman build -t simple -f ch5Dockerfile .
STEP 1/2: FROM bash
ERRO[0000] error unmounting /var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/merged: invalid argument
Error: error mounting new container: error mounting build container "6c0f88a6da54d713e18283e16521385fff736bc1a1072938fddfc6be4b3d43cc": error creating overlay mount to /var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/merged, mount_data="nodev,metacopy=on,lowerdir=/var/lib/containers/storage/overlay/l/BNREFG6CRAAHJ7VSYG3EUXV5UO:/var/lib/containers/storage/overlay/l/MDSWZVRVZNCOW75JF32K6D4QQC:/var/lib/containers/storage/overlay/l/4G3NS52LYHWPTKA4FURHLYMAPF,upperdir=/var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/diff,workdir=/var/lib/containers/storage/overlay/7a617fad39ce9178c810e29aaef4af73647d8e35ae0969483059441c1c4ee9cd/work": invalid argument
root#cks-master:/vagrant/files#
podman version
root#cks-master:/vagrant/files# podman version
Version: 3.4.2
API Version: 3.4.2
Go Version: go1.15.2
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64
root#cks-master:/vagrant/files#
Issue resolved.
I also posted the issue in podman room at https://app.element.io/#/room/#podman:fedoraproject.org
I am suggested with podman reset(command trace is below), then its complained about storage.conf, I removed that file and did reset again. Then its worked.
I still wonder whats inside of storage.conf causing this issue but I deleted before looking into it. Finally its worked and I am able to continue. Hope it helps.
Note: Post the deleting storage.conf file and podman reset, I tried with docker build as well just to check if docker has any dependency over storage.conf file, but none, docker build also executed successfully( command trace below)
root#cks-master:~# podman system reset -f
A storage.conf file exists at /etc/containers/storage.conf
You should remove this file if you did not modified the configuration.
root#cks-master:~# rm /etc/containers/storage.conf
root#cks-master:~# podman system reset -f
root#cks-master:~# podman build -t simple -f /vagrant/files/ch5Dockerfile .
STEP 1/2: FROM bash
Resolving "bash" using unqualified-search registries (/etc/containers/registries.conf)
Trying to pull docker.io/library/bash:latest...
Getting image source signatures
Copying blob 9621f1afde84 done
Copying blob 1dd831616e40 done
Copying blob fd6cd28e0879 done
Copying config 8b332999f6 done
Writing manifest to image destination
Storing signatures
STEP 2/2: CMD ["ping", "killer.sh"]
COMMIT simple
--> cd1407a69ea
Successfully tagged localhost/simple:latest
cd1407a69ea490496d6635700958f2b5fcf2b1d01f8dd218dea0f83187e55872
root#cks-master:~# podman run --name simple simple
PING killer.sh (35.227.196.29): 56 data bytes
64 bytes from 35.227.196.29: seq=0 ttl=42 time=15.689 ms
64 bytes from 35.227.196.29: seq=1 ttl=42 time=14.662 ms
64 bytes from 35.227.196.29: seq=2 ttl=42 time=15.161 ms
^C
--- killer.sh ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 14.662/15.170/15.689 ms
root#cks-master:~# docker build -t simple -f /vagrant/files/ch5Dockerfile .
Sending build context to Docker daemon 3.141MB
Step 1/2 : FROM bash
latest: Pulling from library/bash
9621f1afde84: Pull complete
1dd831616e40: Pull complete
fd6cd28e0879: Pull complete
Digest: sha256:e4624241e953934fc4c396217253d8322ebda53be3b1863cd7795541d168034f
Status: Downloaded newer image for bash:latest
---> 8b332999f684
Step 2/2 : CMD ["ping", "killer.sh"]
---> Running in 306963a83d1c
Removing intermediate container 306963a83d1c
---> 51dee555fd57
Successfully built 51dee555fd57
Successfully tagged simple:latest
root#cks-master:~# ^C
root#cks-master:~#
My error
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ sudo apt-get update
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Fetched 114 kB in 4s (26.4 kB/s)
Reading package lists... Done
W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ sudo apt-get install docker-ce docker-ce-cli containerd.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
docker-ce-rootless-extras docker-scan-plugin pigz slirp4netns
Suggested packages:
aufs-tools cgroupfs-mount | cgroup-lite
The following NEW packages will be installed:
containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras docker-scan-plugin pigz slirp4netns
0 upgraded, 7 newly installed, 0 to remove and 45 not upgraded.
Need to get 104 MB of archives.
After this operation, 448 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://download.docker.com/linux/ubuntu focal/stable amd64 containerd.io amd64 1.4.8-1 [24.7 MB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 pigz amd64 2.4-1 [57.4 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/universe amd64 slirp4netns amd64 0.4.3-1 [74.3 kB]
Get:4 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-cli amd64 5:20.10.7~3-0~ubuntu-focal [41.4 MB]
Get:5 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce amd64 5:20.10.7~3-0~ubuntu-focal [24.8 MB]
Get:6 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-ce-rootless-extras amd64 5:20.10.7~3-0~ubuntu-focal [9063 kB]
Get:7 https://download.docker.com/linux/ubuntu focal/stable amd64 docker-scan-plugin amd64 0.8.0~ubuntu-focal [3889 kB]
Fetched 104 MB in 17s (6216 kB/s)
Selecting previously unselected package pigz.
(Reading database ... 32256 files and directories currently installed.)
Preparing to unpack .../0-pigz_2.4-1_amd64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package containerd.io.
Preparing to unpack .../1-containerd.io_1.4.8-1_amd64.deb ...
Unpacking containerd.io (1.4.8-1) ...
Selecting previously unselected package docker-ce-cli.
Preparing to unpack .../2-docker-ce-cli_5%3a20.10.7~3-0~ubuntu-focal_amd64.deb ...
Unpacking docker-ce-cli (5:20.10.7~3-0~ubuntu-focal) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../3-docker-ce_5%3a20.10.7~3-0~ubuntu-focal_amd64.deb ...
Unpacking docker-ce (5:20.10.7~3-0~ubuntu-focal) ...
Selecting previously unselected package docker-ce-rootless-extras.
Preparing to unpack .../4-docker-ce-rootless-extras_5%3a20.10.7~3-0~ubuntu-focal_amd64.deb ...
Unpacking docker-ce-rootless-extras (5:20.10.7~3-0~ubuntu-focal) ...
Selecting previously unselected package docker-scan-plugin.
Preparing to unpack .../5-docker-scan-plugin_0.8.0~ubuntu-focal_amd64.deb ...
Unpacking docker-scan-plugin (0.8.0~ubuntu-focal) ...
Selecting previously unselected package slirp4netns.
Preparing to unpack .../6-slirp4netns_0.4.3-1_amd64.deb ...
Unpacking slirp4netns (0.4.3-1) ...
Setting up slirp4netns (0.4.3-1) ...
Setting up docker-scan-plugin (0.8.0~ubuntu-focal) ...
Setting up containerd.io (1.4.8-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Setting up docker-ce-cli (5:20.10.7~3-0~ubuntu-focal) ...
Setting up pigz (2.4-1) ...
Setting up docker-ce-rootless-extras (5:20.10.7~3-0~ubuntu-focal) ...
Setting up docker-ce (5:20.10.7~3-0~ubuntu-focal) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
invoke-rc.d: could not determine current runlevel
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.6) ...
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ docker run
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ docker --version
Docker version 20.10.7, build f0df350
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ systemctl start docker
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ sudo dockerd
INFO[2021-07-26T09:26:04.598999900+07:00] Starting up
INFO[2021-07-26T09:26:05.751575600+07:00] libcontainerd: started new containerd process pid=4266
INFO[2021-07-26T09:26:05.751933800+07:00] parsed scheme: "unix" module=grpc
INFO[2021-07-26T09:26:05.752582200+07:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-07-26T09:26:05.752789000+07:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-07-26T09:26:05.753058600+07:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-07-26T09:26:05.784888200+07:00] starting containerd revision=7eba5930496d9bbe375fdf71603e610ad737d2b2 version=1.4.8
INFO[2021-07-26T09:26:05.807969400+07:00] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[2021-07-26T09:26:05.809913000+07:00] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1
INFO[2021-07-26T09:26:06.359366500+07:00] skip loading plugin "io.containerd.snapshotter.v1.aufs"... error="aufs is not supported (modprobe aufs failed: exit status 1 \"modprobe: FATAL: Module aufs not found in directory /lib/modules/4.4.0-19041-Microsoft\\n\"): skip plugin" type=io.containerd.snapshotter.v1
INFO[2021-07-26T09:26:06.360318200+07:00] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1
INFO[2021-07-26T09:26:06.361771600+07:00] skip loading plugin "io.containerd.snapshotter.v1.btrfs"... error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs (wslfs) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
INFO[2021-07-26T09:26:06.362037500+07:00] loading plugin "io.containerd.snapshotter.v1.devmapper"... type=io.containerd.snapshotter.v1
WARN[2021-07-26T09:26:06.362243500+07:00] failed to load plugin io.containerd.snapshotter.v1.devmapper error="devmapper not configured"
INFO[2021-07-26T09:26:06.362974300+07:00] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1
INFO[2021-07-26T09:26:06.365365000+07:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1
INFO[2021-07-26T09:26:06.368026100+07:00] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2021-07-26T09:26:06.368363300+07:00] skip loading 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: skip plugin" type=io.containerd.snapshotter.v1
INFO[2021-07-26T09:26:06.369411200+07:00] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1
WARN[2021-07-26T09:26:06.377457800+07:00] could not use snapshotter devmapper in metadata plugin error="devmapper not configured"
INFO[2021-07-26T09:26:06.378196300+07:00] metadata content store policy set policy=shared
INFO[2021-07-26T09:26:06.384144600+07:00] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1
INFO[2021-07-26T09:26:06.384857900+07:00] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1
INFO[2021-07-26T09:26:06.386379300+07:00] loading plugin "io.containerd.service.v1.introspection-service"... type=io.containerd.service.v1
INFO[2021-07-26T09:26:06.393867000+07:00] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1
INFO[2021-07-26T09:26:06.394944900+07:00] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1
INFO[2021-07-26T09:26:06.395951300+07:00] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1
INFO[2021-07-26T09:26:06.397012700+07:00] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1
INFO[2021-07-26T09:26:06.397965800+07:00] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1
INFO[2021-07-26T09:26:06.398988200+07:00] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1
INFO[2021-07-26T09:26:06.400056700+07:00] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1
INFO[2021-07-26T09:26:06.401187500+07:00] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1
INFO[2021-07-26T09:26:06.408917100+07:00] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2
INFO[2021-07-26T09:26:06.411047900+07:00] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1
INFO[2021-07-26T09:26:06.412279400+07:00] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1
INFO[2021-07-26T09:26:06.412639500+07:00] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1
INFO[2021-07-26T09:26:06.413666800+07:00] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.414645100+07:00] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.415881400+07:00] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.417013800+07:00] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.423490700+07:00] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.424583600+07:00] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.425780700+07:00] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.426810700+07:00] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.427972000+07:00] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1
INFO[2021-07-26T09:26:06.430384700+07:00] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.430569100+07:00] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.431579800+07:00] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.433089700+07:00] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1
INFO[2021-07-26T09:26:06.440447100+07:00] serving... address=/var/run/docker/containerd/containerd-debug.sock
INFO[2021-07-26T09:26:06.441881300+07:00] serving... address=/var/run/docker/containerd/containerd.sock.ttrpc
INFO[2021-07-26T09:26:06.443648400+07:00] serving... address=/var/run/docker/containerd/containerd.sock
INFO[2021-07-26T09:26:06.444409700+07:00] containerd successfully booted in 0.663149s
INFO[2021-07-26T09:26:06.458975000+07:00] parsed scheme: "unix" module=grpc
INFO[2021-07-26T09:26:06.459340200+07:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-07-26T09:26:06.459937000+07:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-07-26T09:26:06.461038500+07:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2021-07-26T09:26:06.464507500+07:00] parsed scheme: "unix" module=grpc
INFO[2021-07-26T09:26:06.465303100+07:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2021-07-26T09:26:06.465948100+07:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2021-07-26T09:26:06.469570200+07:00] ClientConn switching balancer to "pick_first" module=grpc
WARN[2021-07-26T09:26:06.508606600+07:00] Your kernel does not support cgroup memory limit
WARN[2021-07-26T09:26:06.509102200+07:00] Unable to find cpu cgroup in mounts
WARN[2021-07-26T09:26:06.509641700+07:00] Unable to find blkio cgroup in mounts
WARN[2021-07-26T09:26:06.511422700+07:00] Unable to find cpuset cgroup in mounts
WARN[2021-07-26T09:26:06.512210200+07:00] Unable to find pids cgroup in mounts
INFO[2021-07-26T09:26:06.513102200+07:00] Loading containers: start.
WARN[2021-07-26T09:26:06.525628500+07:00] Running iptables --wait -t nat -L -n failed with message: `iptables v1.8.4 (legacy): 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[2021-07-26T09:26:06.633151400+07:00] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby
INFO[2021-07-26T09:26:06.634747000+07:00] stopping healthcheck following graceful shutdown module=libcontainerdINFO[2021-07-26T09:26:06.634766100+07:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
WARN[2021-07-26T09:26:07.650886300+07:00] grpc: addrConn.createTransport failed to connect to {unix:///var/run/docker/containerd/containerd.sock <nil> 0 <nil>}. Err :connection error: desc = "transport: Error while dialing dial unix:///var/run/docker/containerd/containerd.sock: timeout". Reconnecting... module=grpc
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.8.4 (legacy): 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)
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ systemctl start docker
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ docker run hello-world
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ sudo rm -rf /etc/systemd/system/docker.service.d
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ sudo systemctl deamon-reload
Unknown operation deamon-reload.
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ systemctl status docker.service
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
donhuvy#VYLAPTOP:~/temp2607/reaction-development-platform$ sudo su
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# systemctl start docker
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down [ OK ]
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
Executing: /lib/systemd/systemd-sysv-install enable docker
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# systemctl restart docker
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# systemctl restart docker
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# systemctl restart docker
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# /etc/init.d/dbus start
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# service docker stop
* Docker already stopped - file /var/run/docker-ssd.pid not found.
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# cd /var/run/docker/libcontainerd
bash: cd: /var/run/docker/libcontainerd: No such file or directory
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# service docker start
* Starting Docker: docker [ OK ]
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# docker --version
Docker version 20.10.7, build f0df350
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# docker run -v /var/run/docker.sock:/var/run/docker.sock
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# make
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Removed docker development symlink for reaction-hydra
Running pre-build hook script for reaction-hydra.
reaction-hydra post-project-start script invoked.
/bin/sh: 1: docker-compose: not found
make: *** [Makefile:264: build-reaction-hydra] Error 127
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
and
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform# sudo systemctl is-active docker
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
root#VYLAPTOP:/home/donhuvy/temp2607/reaction-development-platform#
How to fix it?
WSL doesn't have an init. You need to use native Windows docker which uses a special WSL for it.
I looked for a solution for this problem and found exactly what you were looking for I think. My goal was to be able to use docker from my WSL distro of choice (Ubuntu).
Make sure you have WSL2 (How to check it)
Download Docker Desktop (I know you don't want to use this but stay with me)
Open docker desktop, go to settings, to Resources, to WSL integration. Here activate the integration with your distro of choice.
Do not forget to hit Apply & Restart
Now open your WSL and type docker run hello-world to test if docker works
I haven't entirely managed to get rid of the same error (I use Windows 10, WSL2 and Ubuntu 20.04 and I sure as hell do not want to use the crappy shareware called Docker Desktop, that annoys the hell of me with all its upgrade and "Pro" crap).
However: following this guide https://dev.to/bowmanjd/install-docker-on-windows-wsl-without-docker-desktop-34m9 seems to help.
I got rid of the "iptables"-related error messages by adding "iptables": false in the /etc/docker/daemon.json configuration. I have not mnaged to start dockerd just now though (apparently "error creating default "bridge" network: permission denied" is haunting me somewhat).
Give it a whirl if you like.
Edit: the reason for the error message was, that my WSL Ubuntu 20.04LTS container was - despite what I thought - not a WSL2 container, but WSL instead.
Make sure to set the version of the container to v2 and make sure to use that container, possibly setting both settings as defaults (v2 and container). See https://stackoverflow.com/a/65005633/15610035 for details on how to do it.
After changing the version of the container to v2 the error message went away.
However: I currently have trouble getting dockerd to expose the ports in a way, that the Windows localhost can access, because the WSL localhost is not the same as the Windows localhost. The reason is, that network is handled differently with WSLv2 - in comparison to WSLv1.
Additional useful articles: https://superuser.com/questions/1131874/how-to-access-localhost-of-linux-subsystem-from-windows and https://github.com/microsoft/WSL/issues/4150 .
I am on Ubuntu and docker version:
Docker version 18.06.3-ce, build d7080c1
I got this error:
OCI runtime create failed: container_linux.go:348: starting container
process caused "process_linux.go:297: copying bootstrap data to pipe
caused \"write init-p: broken pipe\"": unknown
when I ran:
docker build \
--build-arg bitbucket_pwd="$bitbucket_password" \
--build-arg commit_datavana="$commit_sha" \
--build-arg CACHE_BUST="$(date)" \
-t "$name_tag" .
does anyone know what causes that error? Should I downgrade docker?
Downgrade your version from 18.06.3 to 18.06.1 and follow the instruction from this link.It will helpfull
https://medium.com/#dirk.avery/docker-error-response-from-daemon-1d46235ff61d
this error was resolved in my ubuntu 14.04lts system
upgrade your kernel to 4.x version
$ apt-get install --install-recommends linux-generic-lts-xenial
I had the same error when set very low memory limit on kubernetes 200m instead of 200Mi for pod :-)
Normal Scheduled <unknown> default-scheduler Successfully assigned ingress-nginx/ingress-nginx-controller-b979fbd5-bkl2t to worker04.cluster
Warning FailedCreatePodSandBox 12m (x4 over 12m) kubelet, worker04.cluster Failed to create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "ingress-nginx-controller-b979fbd5-bkl2t": Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:338: getting the final child's pid from pipe caused: read init-p: connection reset by peer: unknown
Warning FailedCreatePodSandBox 12m (x9 over 12m) kubelet, worker04.cluster Failed to create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "ingress-nginx-controller-b979fbd5-bkl2t": Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:334: copying bootstrap data to pipe caused: write init-p: broken pipe: unknown
Normal SandboxChanged 7m45s (x284 over 12m) kubelet, worker04.cluster Pod sandbox changed, it will be killed and re-created.
Warning FailedCreatePodSandBox 2m45s (x152 over 11m) kubelet, worker04.cluster (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to start sandbox container for pod "ingress-nginx-controller-b979fbd5-bkl2t": Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:334: copying bootstrap data to pipe caused: write init-p: broken pipe: unknown
The kernel version and the docker version do not match. My original kernel version and docker are:
$ uname -a
Linux cn0314000510l 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ sudo docker --version
Docker version 20.10.7, build 20.10.7-0ubuntu5~18.04.3
Then roll back the docker version and solve it:
$ docker --version
Docker version 18.09.9, build 039a7df9ba
We are using docker containers running alpine linux as build agents in bamboo. As part of the build plan a docker image needs to be created.
Our build agent has docker installed, however we are getting errors as the docker daemon isn't running. Starting the daemon with
/usr/local/bin/dockerd
gives the following:
INFO[0000] libcontainerd: new containerd process, pid: 640
ERRO[0001] 'overlay' is not supported over overlayfs
INFO[0001] Graph migration to content-addressability took 0.00 seconds
INFO[0001] Loading containers: start.
WARN[0001] Running modprobe bridge br_netfilter failed with message: modprobe: can't change directory to '/lib/modules': No such file or directory
, error: exit status 1
WARN[0001] Running modprobe nf_nat failed with message: `modprobe: can't change directory to '/lib/modules': No such file or directory`, error: exit status 1
WARN[0001] Running modprobe xt_conntrack failed with message: `modprobe: can't change directory to '/lib/modules': No such file or directory`, error: exit status 1
Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain: Iptables not found
To try and get round this I've installed iptables. Now when I try to run the docker daemon I get:
INFO[0000] libcontainerd: new containerd process, pid: 705
ERRO[0001] 'overlay' is not supported over overlayfs
INFO[0001] Graph migration to content-addressability took 0.00 seconds
INFO[0001] Loading containers: start.
WARN[0001] Running modprobe bridge br_netfilter failed with message: modprobe: can't change directory to '/lib/modules': No such file or directory
, error: exit status 1
WARN[0001] Running modprobe nf_nat failed with message: `modprobe: can't change directory to '/lib/modules': No such file or directory`, error: exit status 1
WARN[0001] Running modprobe xt_conntrack failed with message: `modprobe: can't change directory to '/lib/modules': No such file or directory`, error: exit status 1
Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.0: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
(exit status 3)
I'm a little stuck on where to go now as sudo isn't a thing on alpine.
Running the Docker daemon inside the Docker container is generally a dodgy prospect. We have this exact same requirement, and we solve it by mounting /var/run/docker.sock from the Docker host into the Docker container:
docker run -v /var/run/docker.sock:/var/run/docker.sock --privileged
That way the docker command inside the build agent container is actually talking to the Docker daemon on the host, not inside the container. Works really well for us.
I'm trying to use Packer to build a docker image of the webapp I'm working on. Whenever I run packer build, when it gets to the step that it runs the runit recipe, I would get Build 'docker' errored: Error executing Chef: Non-zero exit status: 137
I looked into 137, and found out this is the exit code commonly associated with a kill -9. In most cases this would imply that the system is running critically low on memory, and the system is attempting to compensate.
I tried to find the smallest possible reproduction, and I came up with this packer configuration:
{
"builders":[{
"type": "docker",
"pull": false,
"image": "silkstart/basic_server",
"export_path": "image.tar",
"run_command":[
"-d",
"-i",
"-t",
"--memory-reservation",
"1G",
"{{.Image}}",
"/bin/bash"
]
}],
"provisioners":[
{
"type": "chef-solo",
"cookbook_paths": ["cookbooks", "vendor/cookbooks"],
"data_bags_path": "data_bags",
"roles_path": "roles",
"environments_path": "environments",
"run_list": [
"recipe[runit]"
]
}
],
"post-processors": [
{
"type": "docker-import",
"repository": "silkstart/docker_test",
"tag": "0.1"
}
]
}
When I run packer build on this configuration, this is my output:
TMPDIR=/opt/shared packer build packer_files/docker_test.json
docker output will be in this color.
==> docker: Creating a temporary directory for sharing data...
==> docker: Starting docker container...
docker: Run command: docker run -v /opt/shared/packer-docker484290992:/packer-files -d -i -t --memory-reservation 1G silkstart/basic_server /bin/bash
docker: Container ID: 1f87b0cf1fe71f07b580ae6b18415a79c23a1a32a40f5f0366be90f160977a50
==> docker: Provisioning with chef-solo
docker: Installing Chef...
docker: % Total % Received % Xferd Average Speed Time Time Time Current
docker: Dload Upload Total Spent Left Speed
docker: 100 20022 100 20022 0 0 45092 0 --:--:-- --:--:-- --:--:-- 45196
docker: Getting information for chef stable for ubuntu...
docker: downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=ubuntu&pv=14.04&m=x86_64
docker: to file /tmp/install.sh.23/metadata.txt
docker: trying curl...
docker: url https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/14.04/x86_64/chef_12.6.0-1_amd64.deb
docker: md5 5cfc19d5a036b3f7860716bc9795a85e
docker: sha256 e0b42748daf55b5dab815a8ace1de06385db98e29a27ca916cb44f375ef65453
docker: version 12.6.0downloaded metadata file looks valid...
docker: downloading https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/14.04/x86_64/chef_12.6.0-1_amd64.deb
docker: to file /tmp/install.sh.23/chef_12.6.0-1_amd64.deb
docker: trying curl...
docker: Comparing checksum with sha256sum...
docker:
docker: WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
docker:
docker: You are installing an omnibus package without a version pin. If you are installing
docker: on production servers via an automated process this is DANGEROUS and you will
docker: be upgraded without warning on new releases, even to new major releases.
docker: Letting the version float is only appropriate in desktop, test, development or
docker: CI/CD environments.
docker:
docker: WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
docker:
docker: Installing chef
docker: installing with dpkg...
docker: Selecting previously unselected package chef.
docker: (Reading database ... 17195 files and directories currently installed.)
docker: Preparing to unpack .../chef_12.6.0-1_amd64.deb ...
docker: Unpacking chef (12.6.0-1) ...
docker: Setting up chef (12.6.0-1) ...
docker: Thank you for installing Chef!
docker: Creating directory: /tmp/packer-chef-solo
docker: Creating directory: /tmp/packer-chef-solo/cookbooks-0
docker: Creating directory: /tmp/packer-chef-solo/cookbooks-1
docker: Creating directory: /tmp/packer-chef-solo/roles
docker: Creating directory: /tmp/packer-chef-solo/data_bags
docker: Creating directory: /tmp/packer-chef-solo/environments
docker: Creating configuration file 'solo.rb'
docker: Creating JSON attribute file
docker: Executing Chef: sudo chef-solo --no-color -c /tmp/packer-chef-solo/solo.rb -j /tmp/packer-chef-solo/node.json
docker: [2016-01-29T06:42:48+00:00] INFO: Forking chef instance to converge...
docker: [2016-01-29T06:42:48+00:00] INFO: *** Chef 12.6.0 ***
docker: [2016-01-29T06:42:48+00:00] INFO: Chef-client pid: 207
docker: [2016-01-29T06:42:50+00:00] INFO: Setting the run_list to ["recipe[runit]"] from CLI options
docker: [2016-01-29T06:42:50+00:00] INFO: Run List is [recipe[runit]]
docker: [2016-01-29T06:42:50+00:00] INFO: Run List expands to [runit]
docker: [2016-01-29T06:42:50+00:00] INFO: Starting Chef Run for 1f87b0cf1fe7
docker: [2016-01-29T06:42:50+00:00] INFO: Running start handlers
docker: [2016-01-29T06:42:50+00:00] INFO: Start handlers complete.
docker: [2016-01-29T06:42:52+00:00] INFO: Processing service[runit] action nothing (runit::default line 20)
docker: [2016-01-29T06:42:52+00:00] INFO: Processing execute[start-runsvdir] action nothing (runit::default line 24)
docker: [2016-01-29T06:42:52+00:00] INFO: Processing execute[runit-hup-init] action nothing (runit::default line 33)
docker: [2016-01-29T06:42:52+00:00] INFO: Processing apt_package[runit] action install (runit::default line 64)
docker: [2016-01-29T06:42:55+00:00] INFO: Processing cookbook_file[/var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed] action create (dynamically defined)
docker: [2016-01-29T06:42:55+00:00] INFO: cookbook_file[/var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed] created file /var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed
docker: [2016-01-29T06:42:55+00:00] INFO: cookbook_file[/var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed] updated file contents /var/chef/cache/preseed/runit/runit-2.1.1-6.2ubuntu3.seed
docker: [2016-01-29T06:42:55+00:00] INFO: apt_package[runit] pre-seeding package installation instructions
==> docker: Killing the container: 1f87b0cf1fe71f07b580ae6b18415a79c23a1a32a40f5f0366be90f160977a50
Build 'docker' errored: Error executing Chef: Non-zero exit status: 137
I'm not entirely sure what is causing the code 137, and any help would be appreciated.
Update 1
I'm including a gist of the full debug output from Chef. It's much more verbose, mainly due it would seem to all of the attempts Ohai makes to get information.
https://gist.github.com/jrstarke/4c5f3b432aaee70c7f77
No references in here seem to suggest an out of memory error, at least on the docker host.
After much much digging, I found the problem. The underlying problem, and the solution were both found on an issue in cloudfoundry-incubator/garden-linux.
Apparently as part of the setup process one of the post init scripts for runit executes a kill -s HUP 1. Why I'm not entirely sure, but as they noted there, doing a trap '' HUP right before my apt-get install runit and a trap HUP afterwards totally solved my problem.
Check the OOM log on the host machine. Also you can use the execute_command configuration value to turn the log level to debug.
This answer seemed to work for me: https://stackoverflow.com/a/42398166/2878244
I had to increase the memory resources assigned to docker by going to the Docker Tab > Preferences > Advanced