[CSHARP-2968] Exception occurs when using mongodb+srv connection string Created: 14/Feb/20 Updated: 28/Oct/23 Resolved: 06/Apr/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Connectivity, Error Handling |
| Affects Version/s: | 2.10.1 |
| Fix Version/s: | 2.10.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jason Jhuboo | Assignee: | Dmitry Lukyanov (Inactive) |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
AKS (Linux) - Server version v1.14.8 |
||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||
| Description |
|
Our C# applications have been quite happily connecting to various MongoDB Atlas clusters using the SRV connection string for roughly a year now. Since the start of this month, (and about 2 weeks after we upgraded to .NET Core 3.1), we started getting an error with the MongoDB connection 'Record reader index out of sync.' "); foreach (DnsResourceRecord dnsResourceRecord in result.AllRecords) Console.ReadLine(); ```` Replace the mongoDB host for a valid cluster if the one supplied is no longer there - this happens on the free tier and M10 lookups. You will end up with an error that looks like this: ```` DnsClient.DnsResponseException: Unhandled exception ````
Please note, that this error only occurs within AKS! It does not seem to manifest on a Windows 10 machine, or on a Linux box outside of AKS.
This has been cross reported here: https://github.com/MichaCo/DnsClient.NET/issues/51
I can obviously get round this issue by not using seedless connection strings (non SRV connection strings), but SRV connection strings are far preferable from a maintainability point of view.
|
| Comments |
| Comment by Githook User [ 03/Apr/20 ] |
|
Author: {'name': 'DmitryLukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}Message: |
| Comment by Githook User [ 03/Apr/20 ] |
|
Author: {'name': 'DmitryLukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}Message: |
| Comment by Dmitry Lukyanov (Inactive) [ 02/Apr/20 ] |
|
Hello fernanda.palomino, it will be fixed in the next patch release. |
| Comment by Jason Jhuboo [ 02/Apr/20 ] |
|
@Fermanda Palmino - I think that you don't need to wait for a new driver release - your customers can just reference the latest DnsClient package (>=1.3.0) which will supersede the version referenced by the MongoDB C# NuGET package. This package contains the fix, and the MongoDB NuGet package just requires >=1.2.0 if the DnsClient package, soooo it should just work
I think v1.3.1 of the package is out now. |
| Comment by Fernanda Palomino [ 02/Apr/20 ] |
|
Hi dmitry.lukyanov a couple of customers are having issues when using SRV conn string from their apps on .net C#. Do we know in which version this bug will be fixed so we can update those customers? Thanks! |
| Comment by Michael Conrad [ 12/Mar/20 ] |
|
There are also a couple of duplicate issues here. At least I'm pretty sure its the same bug in DnsClient 1.2.0 which will be resolved in 1.3.0:
|
| Comment by Michael Conrad [ 11/Mar/20 ] |
|
Hi (author of DnsClient here), I'm not sure if that's the best way of communicating this but yes, version 1.2.0 has a bug which causes issues right not in AKS which apparently started sending more information then the library expected. This bug seems to be fixed in version 1.3.0. I'm currently in the process of finalizing the release by testing it more and verifying that the bug is fixed.
Sorry for any inconveniences, Thanks, |
| Comment by Jason Jhuboo [ 09/Mar/20 ] |
|
Please see https://github.com/MichaCo/DnsClient.NET/issues/51 - it looks like the problem has been identified and a fix is going to be added to v1.3.0 of the DncClient.NET package |
| Comment by Ranil Mohothadura [ 02/Mar/20 ] |
|
Look like this is not only happening on AKS , but in plain Docker instance created based on .net core 3.1 image gives the same error |