Can not connect to Ryuk at localhost:49160 since fedora 34
See original GitHub issueSince upgrading to Fedora 34, testcontainers cant connect to ryuk anymore
2021-07-27 09:04:28.620 INFO 24831 --- [nPool-worker-19] o.t.d.DockerClientProviderStrategy : Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
2021-07-27 09:04:29.107 INFO 24831 --- [nPool-worker-19] o.t.d.DockerClientProviderStrategy : Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
2021-07-27 09:04:29.109 INFO 24831 --- [nPool-worker-19] org.testcontainers.DockerClientFactory : Docker host IP address is localhost
2021-07-27 09:04:29.133 INFO 24831 --- [nPool-worker-19] org.testcontainers.DockerClientFactory : Connected to docker:
Server Version: 20.10.7
API Version: 1.41
Operating System: Fedora 34 (Workstation Edition)
Total Memory: 31746 MB
2021-07-27 09:04:29.136 INFO 24831 --- [nPool-worker-19] o.t.utility.ImageNameSubstitutor : Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
2021-07-27 09:04:34.656 WARN 24831 --- [containers-ryuk] o.testcontainers.utility.ResourceReaper : Can not connect to Ryuk at localhost:49161
java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.base/java.net.Socket.connect(Socket.java:609)
at org.testcontainers.utility.ResourceReaper.lambda$null$1(ResourceReaper.java:189)
at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27)
at org.testcontainers.utility.ResourceReaper.lambda$start$2(ResourceReaper.java:185)
at java.base/java.lang.Thread.run(Thread.java:829)
2021-07-27 09:04:39.912 WARN 24831 --- [containers-ryuk] o.testcontainers.utility.ResourceReaper : Can not connect to Ryuk at localhost:49161
java.net.SocketTimeoutException: connect timed out
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.base/java.net.Socket.connect(Socket.java:609)
at org.testcontainers.utility.ResourceReaper.lambda$null$1(ResourceReaper.java:189)
at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27)
at org.testcontainers.utility.ResourceReaper.lambda$start$2(ResourceReaper.java:185)
at java.base/java.lang.Thread.run(Thread.java:829)
Normally i dont use a testcontainers.properties file but i also tried to start the tests with
ryuk.container.privileged = true
ryuk.container.timeout = 120
Same result though. Does anyone know if something specific is changed in f34, which i need to change for testcontainers?
My 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:57:20 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:55:04 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.8
GitCommit: 7eba5930496d9bbe375fdf71603e610ad737d2b2
runc:
Version: 1.0.0
GitCommit: v1.0.0-0-g84113ee
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Thx in advance
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Could not connect to Ryuk at localhost:49154 on Docker for ...
Hi,. I am using Docker Desktop on Windows 10. Version 3.0.0 (50684) Engine: 20.10.0. Compose: 1.27.4. Kubernetes: v1.19.3. Notary: 0.6.1
Read more >Could not connect to Ryuk at localhost:49167 - Stack Overflow
I can confirm that this is resolved by updating testcontainers to 1.16.0 version. Was facing the same exception with testcontainers 1.15.3.
Read more >1758227 – SELinux is preventing app from connectto access ...
Description of problem: I'm trying to run a Java application that ... "Can not connect to Ryuk" Expected results: no selinux denial, ...
Read more >Gitlab runner dind service cannot be used with Testcontainers
In the log above we can see that the "Ryuk" container started by Testcontainers to perform end-of-test cleanups, which is the first container ......
Read more >Can not connect to Ryuk at localhost:49160 since fedora 34
Since upgrading to Fedora 34, testcontainers cant connect to ryuk anymore 2021-07-27 09:04:28.620 INFO 24831 --- [nPool-worker-19] ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve tried fresh Fedora 34 installation (fully updated).
How I’ve installed docker:
And after restart:
Testcontainers works like a charm
It could be issue related to updating from Fedora 33 (or messed configuration)
Thanks a lot for trying this out @kucharzyk and confirming that Testcontainers works if the Docker installation itself is clean on Fedora 34. Indeed, from reading different Reddit posts I got the feeling, that certain Docker-related settings in the system get messed up on system update (in this case I still suspect
firewalld), but they get repaired on downgrade or re-installation.Another potential culprit with Fedora is
cgroups. But it seems just having a clean installation with the up-to-date packages from the official Fedora repo provide working without fiddling with configs, so that is very good to know!Since this issue seems to be related to the Docker installation and config on Fedora, I close this issue,