Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-5434

C# Driver 3.0 - Replica Set with Direct Connection failing in Gitlab/Linux Server

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      When I upgraded to the MongoDB.Driver 3.0.0, I couldn't connect to the replica set cluster(ver: 8.0.1) I created locally using Docker. Upon discovering another user facing this issue and raising with your team, I implemented the suggested fix of specifying directConnection=true in the connection string.

      This solved the issue locally. We use mongodb in our gitlab pipeline as part of our tests, and when running in our Linux gitlab runner, we get the error: 
      "MongoDB.Driver.MongoNotPrimaryException : Server returned not primary error."

      This issue doesn't occur locally with the same configuration.

      Related issue: https://jira.mongodb.org/browse/CSHARP-5337

      How to Reproduce

      Steps to reproduce. If possible, please include a Short, Self Contained, Correct (Compilable), Example.

      Additional Background

      Please provide any additional background information that may be helpful in diagnosing the bug.

            Assignee:
            oleksandr.poliakov@mongodb.com Oleksandr Poliakov
            Reporter:
            max.venter@healthnow.co.nz Max Venter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: