-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Can't connect to Ryuk when using Colima #6450
Comments
Is this maybe just a verbose output (showing the first attempts to connect)?
While I receive the same warnings mentioned above. |
I encountered the same problem today, using Testcontainers 1.17.6, macOS 13.1 and colima 0.5.2. Setting |
Yeah, I guess you are right! Then it is of course a much less severe issue. But still a bit of an issue? These logs make you feel like there is an issue, and if you have a different issue (like your tests being unable to connect to their testcontainers, for some reason), then you might waste time chasing a red herring. Also, how would we explain that I don't seem to get those logs when running towards Docker Desktop or when setting up the |
@ananni13: This does not seem to make a difference for me... Running the tests many times now under both conditions, I can see now that the number of "Connection refused" logs will vary, and sometimes they will indeed be zero, which brings further credence to what @HofmeisterAn is saying is true. So maybe you were just lucky after having changed the variable and unlucky before? |
I agree, the message is unfortunate and may lead you to the wrong track. It looks like there is an issue even there isn't.
For me neither.
I do not think Ryuk is starting quicker, I assume Colima forwards the traffic (immediately) to the right place. I haven not found much more information about --network-address. There is not much magic going on in |
For now, the test container could only read Considering this configuration is part of test environment, like |
I got ryuk running with setting
Mapping docker socket from host's home folder do not work with colima, because home folder is mounted from host to colima's VM using Edit:
This enables |
Please, consider reporting this to Colima project. There is something we don't know about it and can not fix it on our own. This is similar to Rancher Desktop, some users report it to Rancher project and just last week we got a contribution from them to improve our docs. |
just want to share my findings if you are running on Mac M1 Sonoma, make sure the colima can retrieved the ip address.
if the address was blank, meaning that probably configured colima wrong then make sure to define this environment variable, mine is defined on
|
Thanks for sharing, @afganhalbana! Do you mind updating our docs? |
sure will do @eddumelendez |
thanks so much, this worked a treat! |
So what you can also do to make sure you're using export DOCKER_HOST=$(colima status -j | jq ".docker_socket") Be aware that |
Module
Core
Testcontainers version
1.17.6
Using the latest Testcontainers version?
Yes
Host OS
macOS Ventura 13.1 (22C65)
Host Arch
ARM
Docker version
What happened?
See the simple reproducer case in https://github.com/skagedal/testcontainers-hello. This has a test case that simply spins up a MySQL container using testcontainers. I run it with an environment as described here, i.e. with the TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE and DOCKER_HOST environment variables set (but not the TESTCONTAINERS_HOST_OVERRIDE):
When running the project, I get many log warnings about being unable to connect to Ryuk:
I'm unsure if this means that it eventually manages to connect to Ryuk or not, but in any case the warnings are unwanted.
If I also add the environment variable TESTCONTAINERS_HOST_OVERRIDE to the IP address that colima listens to, as suggested by this comment, then things run smoothly:
(This setup also seems to helps with better connectivity to other testcontainers in our properietary code, however I was not able to create a reproducer for this.)
Relevant log output
No response
Additional Information
Colima version and status:
$ colima version
colima version 0.5.2
git commit: 6b5b6fe0540e708f0c9d6e8919fab292c671fc72
runtime: docker
arch: aarch64
client: v20.10.23
server: v20.10.20
testcontainers-hello on main via ☕ v17.0.6 on ☁️ (eu-west-1)
$ colima status
INFO[0000] colima is running using QEMU
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] address: 192.168.106.2
INFO[0000] socket: unix:///Users/simon/.colima/default/docker.sock
The text was updated successfully, but these errors were encountered: