[GODRIVER-2679] Improve docs/message for "cannot unmarshal DNS message" error Created: 09/Dec/22  Updated: 24/Jan/23  Resolved: 11/Jan/23

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.12.0, 1.12.0-alpha1

Type: Improvement Priority: Major - P3
Reporter: Eric Milkie Assignee: Benji Rewis (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Documentation Changes: Needed

 Description   

Summary

See https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#hdr-Potential_DNS_Issues
This issue has recently become more severe, due to the following:
1. Serverless instances require an SRV connection string; there is no workaround as suggested on the internet to switch to a non-srv connection string like for Atlas Dedicated instances.
2. The server tools (mongodump and mongorestore in particular) are written using the go driver, but the DNS unmarshalling problem is only documented in the Go driver manual. Users should not have to know how the tools work under the hood to diagnose problems with them.
3. Particularly vexing is the fact that only the Go driver is affected by this issue, and other drivers are not. Typically users try to load some existing data into Serverless when they try it out for the first time, so this first-touch experience is particularly sour when they get this error from the restore tool.

Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).

The latest version of mongorestore is affected by this issue.

How to Reproduce

I'm actually not sure even by looking at https://github.com/golang/go/issues/10622 which specific DNS configurations cause this problem.

Additional Background

Relevant slack conversation (will expire soon): https://mongodb.slack.com/archives/C02GR4CL0AG/p1670479230213549

Documentation:
https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo#hdr-Potential_DNS_Issues



 Comments   
Comment by Benji Rewis (Inactive) [ 11/Jan/23 ]

Given that users are running into this Go driver/Golang issue when using tools like mongorestore, would it be possible to add a similar "Potential DNS Issues" section to the documentation for enterprise tools that rely on the Go driver with almost the same wording as our (now updated) documentation here? Thank you

Comment by Githook User [ 11/Jan/23 ]

Author:

{'name': 'Benjamin Rewis', 'email': '32186188+benjirewis@users.noreply.github.com', 'username': 'benjirewis'}

Message: GODRIVER-2679 Elaborate on DNS issues docs and confusing DNS error. (#1158)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/c05cb8aea4a59fda1fffcc3324707bc3664e7ba0

Comment by Benji Rewis (Inactive) [ 09/Jan/23 ]

Apologies for the delay. Here's a PR to elaborate on our documentation with more explicit workarounds and wrap the cannot unmarshal DNS message error with a pointer to that documentation: https://github.com/mongodb/mongo-go-driver/pull/1158.

I'll follow up with another documentation ticket to make sure there's a similar "Potential DNS Issues" section on enterprise tools that use the Go driver under the hood once we've finalized the messaging within the Go driver.

Generated at Thu Feb 08 08:39:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.