-
-
Notifications
You must be signed in to change notification settings - Fork 512
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]: Error (501) Reason: connection reset by peer #1248
Comments
Hi @meysamhadeli 👋 ! From the bug report I see you are using tc-go v0.15.0, which is a very outdated one. Could you try with latest released version, which is In the meantime, could you share a link to the GH action run so we can lookup the logs? |
Hi @mdelapenya, thanks for response. Ok, I will check this issue with latest version and come back :) |
I upgraded the version of test-container to This is a simple test that I executed for test new version package mongodb
import (
"context"
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/wait"
"testing"
)
func TestMongoDB(t *testing.T) {
ctx := context.Background()
req := testcontainers.ContainerRequest{
Image: "mongo:5",
ExposedPorts: []string{"27017/tcp"},
WaitingFor: wait.ForAll(
wait.ForLog("Waiting for connections"),
wait.ForListeningPort("27017/tcp"),
),
}
container, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
ContainerRequest: req,
Started: true,
})
if err != nil {
t.Fatal(err)
}
// Clean up the container after the test is complete
t.Cleanup(func() {
if err := container.Terminate(ctx); err != nil {
t.Fatalf("failed to terminate container: %s", err)
}
})
}
|
Ok, so it seems an issue with Windows and how we are bootstrapping the Docker client. I think this issue has been already reported in #1249, so if you agree, let me close this so that we can continue in that one 🙏 |
Ok, After fix this bug in new version, I follow my problem :) |
Testcontainers version
v0.15.0
Using the latest Testcontainers version?
Yes
Host OS
Windows
Host arch
X64
Go version
1.19
Docker version
What happened?
Hi,
I get this error sometime in my GitHub action pipeline in my tests and for example connection for RabbitMQ and Postgres with test-container couldn't be established.
I don't have any problem to run my test with test-container in my local machine. But I get sometime this error connection reset by peer in my GitHub action test pipeline!, And sometimes it would be passed!
Could you give me some help?
Thanks.
The text was updated successfully, but these errors were encountered: