-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Steps to reproduce
- On a server with no DNS name resolution, define HTTP_PROXY and HTTPS_PROXY.
- Run "mongosh --nodb"
- Run "snippet install analyze-schema"
Actual
Error message "FetchError: request to https://compass.mongodb.com/... failed, reason: getaddrinfo ENOTFOUND compass.mongodb.com"
Expected
Send the request to the proxy server, without attempting to resolve the DNS name (see curl's behavior).
Notes
This may just be how the HTTP client in the GoLang library works, rather than an actual bug.
"curl https://compass.mongodb.com/mongosh/snippets-index.bson.br" correctly returns a redirect to the raw.githubusercontent.com URL because it sends the host name to the proxy server to resolve the name, instead of attempting to resolve the server name on its own.