0

I have an issue using testcontainers. I have tried to run some tests by IDE or mvn but I am getting this

Caused by: java.lang.IllegalStateException: Could not connect to Ryuk at localhost:49156

Now I tried to check if ryuk is starting and it seems that it is:

docker ps
CONTAINER ID   IMAGE                       COMMAND   CREATED         STATUS        PORTS                                         NAMES
93de3963bc55   testcontainers/ryuk:0.3.1   "/app"    2 seconds ago   Up 1 second   0.0.0.0:49156->8080/tcp, :::49156->8080/tcp   testcontainers-ryuk-1878c953-4d40-4c64-80d7-133a6125b7eb



docker logs testcontainers-ryuk-1878c953-4d40-4c64-80d7-133a6125b7eb 
2022/11/07 17:14:35 Pinging Docker...
2022/11/07 17:14:35 Docker daemon is available!
2022/11/07 17:14:35 Starting on port 8080...
2022/11/07 17:14:35 Started!

this is killed few seconds after the test fails

not sure if this is connected but

docker run testcontainers/ryuk:0.3.1
2022/11/07 17:18:10 Pinging Docker...
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:36 +0x457

getting this error while trying to run it manually.

Other docker images seems to work just fine basic hello world example:

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/


doubleW
  • 590
  • 5
  • 17

1 Answers1

0

Ok it was a VPN issue... it was using the same IP ranges

Answer from Testcontainer with VPN on: Can not connect to Ryuk at localhost:49198 worked just fine

doubleW
  • 590
  • 5
  • 17