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

.NET 5.0 on Linux fails to connect to MongoDB 4.0 Atlas

    XMLWordPrintableJSON

Details

    • Fully Compatible

    Description

      .NET 5.0 app running on Linux cannot connect to MongoDB 4.0 on Atlas. It fails with the following exception:

      Unhandled exception. System.TimeoutException: A timeout occurred after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/mongodb40tlstest-shard-00-00.ebdql.mongodb.net:27017" }", EndPoint: "Unspecified/mongodb40tlstest-shard-00-00.ebdql.mongodb.net:27017", ReasonChanged: "Heartbeat", State: "Disconnected", ServerVersion: , TopologyVersion: , Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server.
       ---> System.IO.IOException:  Received an unexpected EOF or 0 bytes from the transport stream.
      ... stack trace ...
      

      The same app running on .NET Core 3.1 can connect successfully to MongoDB 4.0 on Atlas.

      The same app running on .NET 5.0 can connect successfully to MongoDB 4.2 or later on Atlas.

      Attachments

        Issue Links

          Activity

            People

              james.kovacs@mongodb.com James Kovacs
              james.kovacs@mongodb.com James Kovacs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: