[CSHARP-4001] SRV and TXT DNS Failures - Duplicated DNS Response Breaks Subsequent DNS Response Read Created: 20/Dec/21 Updated: 28/Oct/23 Resolved: 31/Jan/22 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.15.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jack Alder | Assignee: | James Kovacs |
| Resolution: | Fixed | Votes: | 6 |
| Labels: | Kubernetes | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Case: | (copied to CRM) | ||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Description |
SummaryThis issue only affects SRV and TXT lookups (mongodb+srv:// connection strings) in environments where DNS servers are incorrectly As a result, SRV lookups will "fail" in the driver, leading to a server selection timeout with an empty Servers [] list. Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).MongoDB.Bson: 2.14.1 MongoDB Atlas 4.4.10 - M2 Replica Set How to ReproduceDeploy a C# dotnet application to an environment with a propensity for sending repeated/duplicated DNS responses to a single query. In this reproduction, we used Azure's AKS w/ CoreDNS (default) and k8s 1.21. Additional BackgroundThe DnsClient response appears to be holding the second copy of the first request in queue. In this case, we are asking for TXT first followed by SRV, but the order of requests shouldn't matter as: I've linked It's important to note that A and AAAA lookups in a similar environment do not cause issues. As a workaround, you may use the mongodb:// connection string to avoid SRV and TXT lookups. |
| Comments |
| Comment by James Kovacs [ 01/Feb/22 ] |
|
This change will be included with 2.15.0. |
| Comment by Githook User [ 01/Feb/22 ] |
|
Author: {'name': 'James Kovacs', 'email': 'jkovacs@post.harvard.edu', 'username': 'JamesKovacs'}Message: Revert " This reverts commit 3a6dc880244f6b9b19b1a6558861bbfa6dd050be. |
| Comment by Githook User [ 31/Jan/22 ] |
|
Author: {'name': 'James Kovacs', 'email': 'jkovacs@post.harvard.edu', 'username': 'JamesKovacs'}Message: |
| Comment by Githook User [ 31/Jan/22 ] |
|
Author: {'name': 'James Kovacs', 'email': 'jkovacs@post.harvard.edu', 'username': 'JamesKovacs'}Message: |
| Comment by James Kovacs [ 05/Jan/22 ] |
|
The root cause is issue #140 in DnsClient.NET, which I just reported along with a complete repro. Moving this ticket to blocked while waiting on a fix from DnsClient.NET. |