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 run cockroachdb test container on CentOS 8 CI machine #2454
Comments
I created another test to run the cockroachdb test container, but this time without using the module:
If you check out the logs, what you'll find really interesting is that it ends up creating the container, but it is unable to connect to the cockroachdb itself, and if you look at the logs, you'll see that the error output seems pretty much the same as the error log output in the test above... Here are the logs:
|
I resolved this issue on my own... Well, I didn't resolve it, but I found a workaround. I found out that my CI was using CentOS 8. I moved to a different environment where CentOS 7 was being used, and ran the tests again, and it worked. I have a theory that this had nothing to do with testcontainers itself, and something was wrong with my CI itself. As such, I'm closing this issue. |
Adding a final note to this. I ended up fixing this on my CI by restarting the docker service using |
Testcontainers version
v0.29.1
Using the latest Testcontainers version?
Yes
Host OS
Linux (CentOS)
Host arch
x86_64
Go version
1.21
Docker version
Client: Docker Engine - Community Version: 26.0.0 API version: 1.45 Go version: go1.21.8 Git commit: 2ae903e Built: Wed Mar 20 15:19:04 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 26.0.0 API version: 1.45 (minimum version 1.24) Go version: go1.21.8 Git commit: 8b79278 Built: Wed Mar 20 15:17:57 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
Docker info
What happened?
I ran a simple unit test that was responsible for starting the CockroachDB test container on my CI machine:
But when I ran it, I got the following error:
The thing is, you might think that one just needs to increase the wait strategy's timeout. The first problem is, you can't do that for cockroachdb's testcontainer module (see this issue). The second problem is that I went into the testcontainer module for cockroachdb's wait strategies, and modified the library file directly out of curiosity. I increased the Startup Timeout to 10 minutes. That STILL didn't make the cockroachdb test container work. I posted the logs for this below. The logs actually produce some interesting output....
Please note, this test is obviously working perfectly fine on my local Mac machine, but just not on my CI...
Relevant log output
Additional information
No response
The text was updated successfully, but these errors were encountered: