Skip to content
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

ubuntu-24.04: cannot start the database (EphemeralMongo7 1.1.3) #57

Open
marco-merola-ef opened this issue Oct 3, 2024 · 3 comments
Open

Comments

@marco-merola-ef
Copy link

marco-merola-ef commented Oct 3, 2024

Hi, I am getting this error when trying to start the MongoRunner on a github job runner with ubuntu-24.04

Error Message: System.TimeoutException : MongoDB connection availability took longer than the specified timeout of 30 seconds. Consider increasing the value of 'ConnectionTimeout'. Stack Trace: at EphemeralMongo.MongodProcess.StartAndWaitForConnectionReadiness() at EphemeralMongo.MongodProcess.Start() at EphemeralMongo.MongoRunner.RunInternal() at EphemeralMongo.MongoRunner.Run(MongoRunnerOptions options)

Any suggestions?

@mdhom
Copy link

mdhom commented Oct 4, 2024

Do you get this error on every run, or only on the second run? If so, can you manuall kill the currently running mongod process and try again? That helps me, see #58.

@wouterSeyen
Copy link

I'm experiencing the same issue. We have a dotnet solution with several xUnit test projects performing tests using EphemeralMongo.

I use following command to run my tests: dotnet test MySolution.sln

Locally (on Macbook Pro with M2 chip), this works without any issues.

However, in a docker build using mcr.microsoft.com/dotnet/sdk:8.0 as base image, this results in the same error as described in bug description.

@marco-merola-ef
Copy link
Author

@wouterSeyen I managed to solve it by using dotnet test container for mongo: https://dotnet.testcontainers.org/modules/mongodb/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants