Skip to content

Could not connect to Ryuk - Linux, Docker 20.10.0, 1.15.0-rc2 #3572

@ullrichp

Description

@ullrichp

As this is my first issue i would like to say "Thank you" to all maintainers and contributors.

Apparently, out of nothing my tests started to throw:

Caused by: java.lang.IllegalStateException: Could not connect to Ryuk at localhost:49160
	at org.testcontainers.utility.ResourceReaper.start(ResourceReaper.java:171)
	at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:201)
	at org.testcontainers.LazyDockerClient.getDockerClient(LazyDockerClient.java:14)
	at org.testcontainers.LazyDockerClient.listImagesCmd(LazyDockerClient.java:12)
	at org.testcontainers.images.LocalImagesCache.maybeInitCache(LocalImagesCache.java:68)
	at org.testcontainers.images.LocalImagesCache.get(LocalImagesCache.java:32)
	at org.testcontainers.images.AbstractImagePullPolicy.shouldPull(AbstractImagePullPolicy.java:18)
	at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:65)
	at org.testcontainers.images.RemoteDockerImage.resolve(RemoteDockerImage.java:26)
	at org.testcontainers.utility.LazyFuture.getResolvedValue(LazyFuture.java:17)
	at org.testcontainers.utility.LazyFuture.get(LazyFuture.java:39)
	at org.testcontainers.containers.GenericContainer.getDockerImageName(GenericContainer.java:1280)
	... 266 more

I am on Linux with:
openjdk 11.0.8 2020-07-14
testcontainers 1.15.0-rc2
docker 20.10.0

The container seems to start:

$ docker ps -a
CONTAINER ID   IMAGE                       COMMAND   CREATED        STATUS                  PORTS                     NAMES
85335add1def   testcontainers/ryuk:0.3.0   "/app"    1 second ago   Up Less than a second   0.0.0.0:49160->8080/tcp   testcontainers-ryuk-2b08ab75-8559-48fc-8f73-8d233b45c430

and the logs do not seem too wrong:

$ docker logs 85335add1def
2020/12/09 09:47:37 Pinging Docker...
2020/12/09 09:47:37 Docker daemon is available!
2020/12/09 09:47:37 Starting on port 8080...
2020/12/09 09:47:37 Started!

Still, the above exception happens after the default timeout of 30 seconds.

Let me know if you need more information, stack traces or logs.

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