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

MongoDB client connection string not parsed correctly any more #511

Open
dewet22 opened this issue Feb 27, 2024 · 0 comments
Open

MongoDB client connection string not parsed correctly any more #511

dewet22 opened this issue Feb 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dewet22
Copy link

dewet22 commented Feb 27, 2024

Description

Between 0.5.0-beta.12 and 0.5.0-beta.18 (no releases in-between? also no git tags I can find?) it seems the parsing for MongoDB connection strings/database names was broken. This config worked before but resulted in a stack trace after updating the docker image to .18:

      ...
      "ConnectionStrings": {
        "Type": "mongodb",
        "DatabaseName": "InformaticsGateway"
      },
      ...

Injected via env variable is the connection string, in order to load it from kubernetes secrets, although that doesn't seem to make a difference since the same behaviour exhibits when that is put in the json config file as well:

ConnectionStrings__InformaticsGatewayDatabase=mongodb://mig:xxx@mongodb:27017/InformaticsGateway

I've verified that connection string works across MongoDB versions 5, 6 and 7 using mongosh so it isn't an authentication issue.

Relevant stack trace:

│ 2024-02-27 22:47:00.8535|3011|ERROR|Monai.Deploy.InformaticsGateway.Services.Connectors.PayloadAssembler|EventId=3011, EventName=ErrorProcessingBuckets|Error while processing buckets/payloads. System.ArgumentException:  │
│ Database names must be non-empty and not contain '.' or the null character. (Parameter 'databaseName')                                                                                                                      │
│    at MongoDB.Driver.Core.Misc.Ensure.That[T](T value, Func`2 assertion, String paramName, String message)                                                                                                                  │
│    at MongoDB.Driver.DatabaseNamespace..ctor(String databaseName)                                                                                                                                                           │
│    at MongoDB.Driver.MongoClient.GetDatabase(String name, MongoDatabaseSettings settings)                                                                                                                                   │

Configuration

  • Informatics Gateway version/commit: 0.4.1 running stable in production, I was investigating upgrading to latest/0.5.0-beta.90 and worked backwards
  • OS and version (distro if applicable): Amazon Linux on EKS
  • Kubernetes version (if applicable): 1.29
  • Docker version (if applicable): unknown
  • Installation source (NGC, Dockerhub, or something else): custom helm charts pulling from Dockerhub
  • Hardware configuration (CPU, GPU, memory, storage, etc...): n/a

Regression?

Yes, works fine in 0.4.1 until 0.5.0-beta.12, seems broken after that. I've tried to look through commits since 2023-09-22 which was the last known good point but GitHub's UI is just frustrating me.

@dewet22 dewet22 added the bug Something isn't working label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant