testcontainers / testcontainers/testcontainers-java

Can not connect to Ryuk at localhost:49154

Open
#5,122 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

Dear all,

I'm running testcontainers on Windows and Linux (WSL2).
On both systems I get since some days the following error when I try to use test containers.
I'm using Docker Desktop 4.5.1 (74721)

The following logs are from Ubuntu (WSL2):

12:47:43.495 [testcontainers-ryuk] WARN  o.t.utility.ResourceReaper - Can not connect to Ryuk at localhost:49154
java.net.ConnectException: Connection refused: connect

When I run ryuk on its own, I get this

$ docker run quay.io/testcontainers/ryuk
2022/02/25 12:43:56 Starting on port 8080...
panic: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

goroutine 1 [running]:
main.main()
        /go/src/github.com/testcontainers/moby-ryuk/main.go:31 +0xe2e

Here the docker logs of the container when I run it with mvn test:

$ docker logs 4fed1346fccd
2022/02/25 12:52:38 Starting on port 8080...

I get the same output when I run the stuff on windows.

If I look at the line starting with panic:

panic: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

As I'm using Docker Desktop, there is no such pipe, but you could use tcp://0.0.0.0:2375 to connect to docker.
But it seems in the past testcontainer had no issue with that. I'm not sure what was updated, so that it is now broken.
Is it possible to tell ryuk to use the tcp URL instead of the unix pipe?

Best regards,
Dieter

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with mvn test and inspect Testcontainers' ResourceReaper together with the Ryuk entry point mentioned at main.go:31. Check how the Docker endpoint is supplied on Windows and WSL2; done means Ryuk connects successfully and the test run no longer reports the localhost:49154 refusal.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
devops, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.