[CSHARP-1446] Uncought task exception when connection timeout occurs Created: 16/Oct/15 Updated: 05/Apr/19 Resolved: 16/Oct/15 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Connectivity |
| Affects Version/s: | 2.0, 2.0.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Blocker - P1 |
| Reporter: | Philipp Hebing | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | Bug, UnobservedTaskException, driver, exception, question, unhandled | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
After creating a MongoClient and getting the Database with }, LatencyLimitingServerSelector { AllowedLatencyRange = 00:00:00.0150000 }}. Client view of cluster state is { ClusterId : "1", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: " { ClusterId : 1, EndPoint : "Unspecified/localhost:27017" }", EndPoint: "Unspecified/localhost:27017", State: "Disconnected", Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.Net.Sockets.SocketException: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 127.0.0.1:27017 ..." |
| Comments |
| Comment by Craig Wilson [ 16/Oct/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks Philipp... Please re-open if that turns out to not be the issue. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philipp Hebing [ 16/Oct/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Well i think i found the problem by myself now: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Philipp Hebing [ 16/Oct/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This console application causes the error. Since the error only occures when the Task is collected by the GC you have to let the program run for a bit and wait (about 2 Minutes).
(sorry for bad formating but i am kind of in a rush) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Craig Wilson [ 16/Oct/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Philipp, Can you provide some more details. I've attempted to reproduce this in a simple Console application, but no unobserved exception showed up. What type of application is this? Are you connecting to a standalone, replica set, or mongos'? Is it possible to provide a simple repro of the problem? Craig |