Open sebastianbuechler opened 7 months ago
Same for me. Started after update to 0.30.0
V0.30.0 has been causing issues in my team as well. Different setups running Docker Desktop and Rancher - both running consistently into:
port not found: creating reaper failed: failed to create container
or
dial tcp [::1]:32810: connect: connection refused: Connecting to Ryuk on localhost:32810 failed: connecting to network reaper failed: failed to create network
Downgrading to v0.29.2 fixed it.
Mmm I'm going to prioritise this, as it should work.... Please check the +100 usages of this new release without issue (I supose) https://github.com/search?q=%22testcontainers-go+v0.30%22+path%3Ago.mod+NOT+is%3Afork+NOT+org%3Atestcontainers+&type=code
From the logs, it seems Ryuk dies before the next container is started. Could you try enabling the verbose mode in Ryuk and trying to capture Ryuk logs and see if the connections are happening?
👋 seeing the same issue. https://github.com/openfga/openfga/actions/runs/8926586012/job/24517945125.
I'm not sure about the original error in this issue but the "port not found: creating reaper failed: failed to create container" that was mentioned by @weeco seems to be related to https://github.com/testcontainers/testcontainers-go/issues/605
With the commit 5fa65489 DockerContainer.MappedPort(...)
now uses the ContainerJSON cache in Inspect()
instead of always going for the client. And sometimes that cache happens to miss the mapping in the network settings.
In my setup this doesn't only affect Ryuk but other containers as well. Commenting out the early return at https://github.com/testcontainers/testcontainers-go/blob/5fa65489ac33e7a6a15e4599739b2c717cf3a1a9/docker.go#L168 solved the issue for me, but I'm not sure if this is a valid solution :)
I encountered the same issue. Workaround of @stubents did not fix it for me.
I encountered the same issue. Workaround of @stubents did not fix it for me.
Now, that I downgraded to v0.29.1
I still see those "port not found" errors coming every now and then, so I guess 5fa6548 just made them more likely to happen.
I guess this should be fixed by https://github.com/testcontainers/testcontainers-go/pull/2508.
@kiview I'm still having this issue with colima version 0.6.9, is there anything I can do to fix that?
any updates?
Could be related to the fix here https://github.com/testcontainers/moby-ryuk/pull/121, still needs a release and then testcontainers-go updating to use the new image.
Try cloning the moby-ryuk repo and running the following in it to replace the image that testcontainers-go uses to see if it does fix:
docker build -f linux/Dockerfile -t testcontainers/ryuk:0.7.0 .
Just got this with version 0.32.0 on my Ubuntu machine. We get this once in awhile on CI as well (Github Actions), but I haven't seen this happening often on dev machine yet.
panic: Error response from daemon: No such container: e4e95c74d1f499df597b3f93b8d3bb1df5bcfc11ca64cb63ac38c08607d50380: creating reaper failed: failed to create container [recovered] panic: Error response from daemon: No such container: e4e95c74d1f499df597b3f93b8d3bb1df5bcfc11ca64cb63ac38c08607d50380: creating reaper failed: failed to create container
Feels like, this should not be a closed issue, as it still happens on latest published version?
@strowk does it happen using the HEAD commit in main?
We usually close the issues when PR fixing them are merged (thanks to Github links) so I think it's a common practice to do that.
Hello! Trying out testcontainer for the first time and just into this issue. I see the bump Ryuk 0.8.1 but still getting this error
create container: started hook: wait until ready: dial tcp: lookup null: no such host: could not start container: creating reaper failed
My setup is super minimal. Just want to bring up a postgres container.
pgContainer, err := postgres.Run(ctx,
"postgres:16-alpine",
postgres.WithDatabase("test-db"),
postgres.WithUsername("postgres"),
postgres.WithPassword("postgres"),
testcontainers.WithWaitStrategy(
wait.ForLog("database system is ready to accept connections").
WithOccurrence(2).WithStartupTimeout(5*time.Second)),
)
Using Colima + macOS. Curious if there's any workaround for this?
Ah as a workaround I set env var TESTCONTAINERS_RYUK_DISABLED
to true
. It seems to get things going!
Related issue i think https://github.com/testcontainers/testcontainers-go/issues/2798 ?
Same problem here:
pgContainer, err := containerPostgres.Run(ctx,
"docker.io/postgres:13.3-alpine",
// containerPostgres.WithInitScripts(filepath.Join("../../assets", "db", "initdb.sql")),
// containerPostgres.WithConfigFile(filepath.Join("testdata", "my-postgres.conf")),
containerPostgres.WithDatabase(dbName),
containerPostgres.WithUsername(dbUser),
containerPostgres.WithPassword(dbPassword),
// testcontainers.WithHostPortAccess(5432),
testcontainers.WithWaitStrategy(
wait.ForLog("database system is ready to accept connections").
WithStartupTimeout(25*time.Second),
wait.ForListeningPort("5432/tcp"),
),
)
setting TESTCONTAINERS_RYUK_DISABLED to true to keep working.
Could you check with the branch from https://github.com/testcontainers/testcontainers-go/pull/2728 to see if that fixes the issue for you @marcosfilhote please?
Testcontainers version
0.30.0
Using the latest Testcontainers version?
Yes
Host OS
Windows 11
Host arch
amd64
Go version
1.21.6
Docker version
Docker info
What happened?
I ran an integration test that spins up a PostgreSQL database which usually works without any issue on other systems. But on this machine it says:
Relevant log output
No response
Additional information
No response