Skip to content

creating reaper failed: could not start container: dial tcp: i/o timeout #279

@jgehrcke

Description

@jgehrcke

Got to see failed to create container: creating reaper failed: could not start container: dial tcp: i/o timeout in a docker-in-docker situation, whereas in the container (where testcontainers-go runs) the /var/run/docker.sock file (from the host) is mounted. Not even sure what exactly tries to TCP-connect() to where exactly, but clearly that TCP connection fails dial tcp: i/o timeout.

Worked around this, for now, with SkipReaper: true. Would appreciate any pointers / ideas for why this happens, and what can be done about this! Can the reaper container be started with the equivalent of --net=host? What are the downsides of skipping the reaper, really?

Using Go 1.15.6 and github.com/testcontainers/testcontainers-go v0.9.0.

Some docker environment information:

[2021-01-18T15:33:44Z] docker info
[2021-01-18T15:33:44Z] Client:
[2021-01-18T15:33:44Z]  Debug Mode: false
[2021-01-18T15:33:44Z]
[2021-01-18T15:33:44Z] Server:
[2021-01-18T15:33:44Z]  Containers: 59
[2021-01-18T15:33:44Z]   Running: 5
[2021-01-18T15:33:44Z]   Paused: 0
[2021-01-18T15:33:44Z]   Stopped: 54
[2021-01-18T15:33:44Z]  Images: 270
[2021-01-18T15:33:44Z]  Server Version: 19.03.13
[2021-01-18T15:33:44Z]  Storage Driver: overlay2
[2021-01-18T15:33:44Z]   Backing Filesystem: xfs
[2021-01-18T15:33:44Z]   Supports d_type: true
[2021-01-18T15:33:44Z]   Native Overlay Diff: true
[2021-01-18T15:33:44Z]  Logging Driver: json-file
[2021-01-18T15:33:44Z]  Cgroup Driver: cgroupfs
[2021-01-18T15:33:44Z]  Plugins:
[2021-01-18T15:33:44Z]   Volume: local
[2021-01-18T15:33:44Z]   Network: bridge host ipvlan macvlan null overlay
[2021-01-18T15:33:44Z]   Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
[2021-01-18T15:33:44Z]  Swarm: inactive
[2021-01-18T15:33:44Z]  Runtimes: runc
[2021-01-18T15:33:44Z]  Default Runtime: runc
[2021-01-18T15:33:44Z]  Init Binary: docker-init
[2021-01-18T15:33:44Z]  containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
[2021-01-18T15:33:44Z]  runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
[2021-01-18T15:33:44Z]  init version: fec3683
[2021-01-18T15:33:44Z]  Security Options:
[2021-01-18T15:33:44Z]   seccomp
[2021-01-18T15:33:44Z]    Profile: default
[2021-01-18T15:33:44Z]  Kernel Version: 4.14.203-156.332.amzn2.x86_64
[2021-01-18T15:33:44Z]  Operating System: Amazon Linux 2
[2021-01-18T15:33:44Z]  OSType: linux
[2021-01-18T15:33:44Z]  Architecture: x86_64
[2021-01-18T15:33:44Z]  CPUs: 4
[2021-01-18T15:33:44Z]  Total Memory: 30.96GiB
[2021-01-18T15:33:44Z]  Name: ip-10-0-2-89.us-west-2.compute.internal
[2021-01-18T15:33:44Z]  ID: 2KO3:JNLJ:K7SM:P7YJ:4B54:UF4Q:S2NR:LKCB:EDA4:TXUN:ATHQ:5JTE
[2021-01-18T15:33:44Z]  Docker Root Dir: /var/lib/docker
[2021-01-18T15:33:44Z]  Debug Mode: false
[2021-01-18T15:33:44Z]  Username: matappelman
[2021-01-18T15:33:44Z]  Registry: https://index.docker.io/v1/
[2021-01-18T15:33:44Z]  Labels:
[2021-01-18T15:33:44Z]  Experimental: false
[2021-01-18T15:33:44Z]  Insecure Registries:
[2021-01-18T15:33:44Z]   127.0.0.0/8
[2021-01-18T15:33:44Z]  Live Restore Enabled: false
[2021-01-18T15:33:44Z]  Product License: Community Engine
[2021-01-18T15:33:44Z]
[2021-01-18T15:33:44Z] docker version
[2021-01-18T15:33:44Z] Client: Docker Engine - Community
[2021-01-18T15:33:44Z]  Version:           19.03.14
[2021-01-18T15:33:44Z]  API version:       1.40
[2021-01-18T15:33:44Z]  Go version:        go1.13.15
[2021-01-18T15:33:44Z]  Git commit:        5eb3275
[2021-01-18T15:33:44Z]  Built:             Tue Dec  1 19:14:24 2020
[2021-01-18T15:33:44Z]  OS/Arch:           linux/amd64
[2021-01-18T15:33:44Z]  Experimental:      false
[2021-01-18T15:33:44Z]
[2021-01-18T15:33:44Z] Server: Docker Engine - Community
[2021-01-18T15:33:44Z]  Engine:
[2021-01-18T15:33:44Z]   Version:          19.03.13
[2021-01-18T15:33:44Z]   API version:      1.40 (minimum version 1.12)
[2021-01-18T15:33:44Z]   Go version:       go1.13.15
[2021-01-18T15:33:44Z]   Git commit:       4484c46
[2021-01-18T15:33:44Z]   Built:            Wed Sep 16 17:04:43 2020
[2021-01-18T15:33:44Z]   OS/Arch:          linux/amd64
[2021-01-18T15:33:44Z]   Experimental:     false
[2021-01-18T15:33:44Z]  containerd:
[2021-01-18T15:33:44Z]   Version:          v1.3.7
[2021-01-18T15:33:44Z]   GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
[2021-01-18T15:33:44Z]  runc:
[2021-01-18T15:33:44Z]   Version:          1.0.0-rc10
[2021-01-18T15:33:44Z]   GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
[2021-01-18T15:33:44Z]  docker-init:
[2021-01-18T15:33:44Z]   Version:          0.18.0
[2021-01-18T15:33:44Z]   GitCommit:        fec3683

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions