Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1201

mongosh attempts to resolve server name even with HTTPS_PROXY and HTTP_PROXY defined

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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.

            Assignee:
            massimiliano.marcon@mongodb.com Massimiliano Marcon
            Reporter:
            nitin.katkam@mongodb.com Nitin Katkam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: