Docker Community Forums

Share and learn in the Docker community.

Error running docker hello-world

Hi all. I’am new to docker.

I installed Docker on Ubuntu following the steps on this website. Install Docker Engine on Ubuntu | Docker Documentation

But I can’t run hello-world.

$ docker run --rm hello-world
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8/log.json: no such file or directory): runc did not terminate successfully: unknown.

I found a simlilar issue on stackoverflow : docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error - Stack Overflow , It solved by removing some folder

removing the container state folder with rm -rf /var/run/docker/runtime-runc/moby/docker_id

I try to run docker in the debug mode.

  1. stop docker with systemctl stop docker
  2. run docker in debug mode dockerd --debug
  3. start container with docker run container_name

And faced the same issue:

...
ERRO[2021-07-12T16:44:34.527302097+08:00] stream copy error: reading from a closed fifo
ERRO[2021-07-12T16:44:34.538172447+08:00] stream copy error: reading from a closed fifo
...
ERRO[2021-07-12T16:44:34.620842886+08:00] 689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8 cleanup: failed to delete container from containerd: no such container

But I cannot find the path

$ cd /var/run/docker/runtime-runc/moby
cd: no such file or directory: /var/run/docker/runtime-runc/moby

Does anyone know how to fix it?
Thanks!

Other Info

Docker full log:

DEBU[2021-07-12T16:44:34.406478524+08:00] Calling HEAD /_ping
DEBU[2021-07-12T16:44:34.407389714+08:00] Calling POST /v1.41/containers/create
DEBU[2021-07-12T16:44:34.407581574+08:00] form data: {"AttachStderr":true,"AttachStdin":false,"AttachStdout":true,"Cmd":null,"Domainname":"","Entrypoint":null,"Env":null,"HostConfig":{"AutoRemove":true,"Binds":null,"BlkioDeviceReadBps":null,"BlkioDeviceReadIOps":null,"BlkioDeviceWriteBps":null,"BlkioDeviceWriteIOps":null,"BlkioWeight":0,"BlkioWeightDevice":[],"CapAdd":null,"CapDrop":null,"Cgroup":"","CgroupParent":"","CgroupnsMode":"","ConsoleSize":[0,0],"ContainerIDFile":"","CpuCount":0,"CpuPercent":0,"CpuPeriod":0,"CpuQuota":0,"CpuRealtimePeriod":0,"CpuRealtimeRuntime":0,"CpuShares":0,"CpusetCpus":"","CpusetMems":"","DeviceCgroupRules":null,"DeviceRequests":null,"Devices":[],"Dns":[],"DnsOptions":[],"DnsSearch":[],"ExtraHosts":null,"GroupAdd":null,"IOMaximumBandwidth":0,"IOMaximumIOps":0,"IpcMode":"","Isolation":"","KernelMemory":0,"KernelMemoryTCP":0,"Links":null,"LogConfig":{"Config":{},"Type":""},"MaskedPaths":null,"Memory":0,"MemoryReservation":0,"MemorySwap":0,"MemorySwappiness":-1,"NanoCpus":0,"NetworkMode":"default","OomKillDisable":false,"OomScoreAdj":0,"PidMode":"","PidsLimit":0,"PortBindings":{},"Privileged":false,"PublishAllPorts":false,"ReadonlyPaths":null,"ReadonlyRootfs":false,"RestartPolicy":{"MaximumRetryCount":0,"Name":"no"},"SecurityOpt":null,"ShmSize":0,"UTSMode":"","Ulimits":null,"UsernsMode":"","VolumeDriver":"","VolumesFrom":null},"Hostname":"","Image":"hello-world","Labels":{},"NetworkingConfig":{"EndpointsConfig":{}},"OnBuild":null,"OpenStdin":false,"Platform":null,"StdinOnce":false,"Tty":false,"User":"","Volumes":{},"WorkingDir":""}
DEBU[2021-07-12T16:44:34.436604829+08:00] container mounted via layerStore: &{/var/lib/docker/overlay2/6e7db87cc1f6c402f1bcf5909a7cbf9e1d081043acf1e72c631f3064de6b975b/merged 0x561a36536440 0x561a36536440}  container=689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8
DEBU[2021-07-12T16:44:34.459944362+08:00] Calling POST /v1.41/containers/689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8/attach?stderr=1&stdout=1&stream=1
DEBU[2021-07-12T16:44:34.460087281+08:00] attach: stdout: begin
DEBU[2021-07-12T16:44:34.460126428+08:00] attach: stderr: begin
DEBU[2021-07-12T16:44:34.460372647+08:00] Calling POST /v1.41/containers/689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8/wait?condition=removed
DEBU[2021-07-12T16:44:34.460789268+08:00] Calling POST /v1.41/containers/689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8/start
DEBU[2021-07-12T16:44:34.461514682+08:00] container mounted via layerStore: &{/var/lib/docker/overlay2/6e7db87cc1f6c402f1bcf5909a7cbf9e1d081043acf1e72c631f3064de6b975b/merged 0x561a36536440 0x561a36536440}  container=689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8
DEBU[2021-07-12T16:44:34.461830050+08:00] Assigning addresses for endpoint xenodochial_blackwell's interface on network bridge
DEBU[2021-07-12T16:44:34.461882549+08:00] RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])
DEBU[2021-07-12T16:44:34.461900492+08:00] Request address PoolID:172.17.0.0/16 App: ipam/default/data, ID: LocalDefault/172.17.0.0/16, DBIndex: 0x0, Bits: 65536, Unselected: 65533, Sequence: (0xc0000000, 1)->(0x0, 2046)->(0x1, 1)->end Curr:0 Serial:false PrefAddress:<nil>
DEBU[2021-07-12T16:44:34.472964308+08:00] Assigning addresses for endpoint xenodochial_blackwell's interface on network bridge
DEBU[2021-07-12T16:44:34.478615135+08:00] Programming external connectivity on endpoint xenodochial_blackwell (0ee119080c65d7bda742e59adf2c599d51d2f4c71c74a787167b1a298a5aad5a)
DEBU[2021-07-12T16:44:34.480127730+08:00] EnableService 689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8 START
DEBU[2021-07-12T16:44:34.480169018+08:00] EnableService 689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8 DONE
DEBU[2021-07-12T16:44:34.482688196+08:00] bundle dir created                            bundle=/var/run/docker/containerd/689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8 module=libcontainerd namespace=moby root=/var/lib/docker/overlay2/6e7db87cc1f6c402f1bcf5909a7cbf9e1d081043acf1e72c631f3064de6b975b/merged
ERRO[2021-07-12T16:44:34.527302097+08:00] stream copy error: reading from a closed fifo
ERRO[2021-07-12T16:44:34.538172447+08:00] stream copy error: reading from a closed fifo
DEBU[2021-07-12T16:44:34.538407389+08:00] attach: stdout: end
DEBU[2021-07-12T16:44:34.538413483+08:00] attach: stderr: end
DEBU[2021-07-12T16:44:34.540538258+08:00] attach done
DEBU[2021-07-12T16:44:34.547213599+08:00] Revoking external connectivity on endpoint xenodochial_blackwell (0ee119080c65d7bda742e59adf2c599d51d2f4c71c74a787167b1a298a5aad5a)
DEBU[2021-07-12T16:44:34.547760136+08:00] DeleteConntrackEntries purged ipv4:0, ipv6:0
DEBU[2021-07-12T16:44:34.593564303+08:00] Releasing addresses for endpoint xenodochial_blackwell's interface on network bridge
DEBU[2021-07-12T16:44:34.593607733+08:00] ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.2)
DEBU[2021-07-12T16:44:34.593749204+08:00] Released address PoolID:LocalDefault/172.17.0.0/16, Address:172.17.0.2 Sequence:App: ipam/default/data, ID: LocalDefault/172.17.0.0/16, DBIndex: 0x0, Bits: 65536, Unselected: 65532, Sequence: (0xe0000000, 1)->(0x0, 2046)->(0x1, 1)->end Curr:3
ERRO[2021-07-12T16:44:34.620842886+08:00] 689c3057d1916675caa02742946a1fb92fd5b8c89d998076f6c8fd8b6bf966a8 cleanup: failed to delete container from containerd: no such container

Kernel info:

uname -rs
Linux 4.15.0-147-generic

OS info:

cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Runc info

whereis runc
runc: /usr/bin/runc

whereis docker-runc
docker-runc:

Docker version:

docker version
Client: Docker Engine - Community
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        f0df350
 Built:             Wed Jun  2 11:56:40 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            Wed Jun  2 11:54:48 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0