[CSHARP-3182] Getting timeout error when using driver in WinForms .net core 3.1 project Created: 12/Aug/20  Updated: 28/Oct/23  Resolved: 21/Aug/20

Status: Closed
Project: C# Driver
Component/s: Connectivity
Affects Version/s: 2.11.0
Fix Version/s: 2.11.1

Type: Bug Priority: Critical - P2
Reporter: Donny V Assignee: Dmitry Lukyanov (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10 v1709
Visual Studio 2019
.NET Core 3.1


Issue Links:
Cloners
is cloned by CSHARP-3183 Timeout in connection when running te... Closed

 Description   

I'm getting this error when I try to do a simple query. I've tested older versions of the driver like 2.10.4 and 2.10.0 and it works fine.

 

Query

 var connStr = "mongodb://localhost:27029/?readPreference=primary";
 MongoClient client = new MongoClient(connStr);
 IMongoDatabase db = client.GetDatabase("COVID19_Clearance");
 var users = db.GetCollection<dynamic>("User").Find(new BsonDocument()).ToList();

Error

A timeout occured 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: "Automatic",
 Type: "Unknown",
 State: "Disconnected",
 Servers: [{
 ServerId: "{ ClusterId : 1, EndPoint : " 127.0.0.1: 27029 " }",
 EndPoint: "127.0.0.1:27029",
 ReasonChanged: "ServerInitialDescription",
 State: "Disconnected",
 ServerVersion: ,
 TopologyVersion: ,
 Type: "Unknown",
 LastHeartbeatTimestamp: null,
 LastUpdateTimestamp: "2020-08-11T20:16:18.1181398Z"
 }
 ]
}



 Comments   
Comment by Githook User [ 21/Aug/20 ]

Author:

{'name': 'DmitryLukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}

Message: CSHARP-3182: Getting timeout error when using driver in WinForms .net core 3.1 project.
Branch: v2.11.x
https://github.com/mongodb/mongo-csharp-driver/commit/f09dbbcb2820082e51dbae22d6c83e1a25a6a30e

Comment by Githook User [ 21/Aug/20 ]

Author:

{'name': 'DmitryLukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}

Message: CSHARP-3182: Getting timeout error when using driver in WinForms .net core 3.1 project.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/e604deb755d600ef3a628c06f8cdfdf757d073d1

Generated at Wed Feb 07 21:44:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.