Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-49488

Mongo shell is conflating authentication & network errors

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Networking, Shell
    • None
    • v4.4
    • STM 2020-08-10, STM 2020-08-24
    • 1

      The mongo shell attempts to authenticate right after it connects to a server and returns an exception if it's unable to. This means that if the client credentials are invalid, it will interpret that as a connection failure and raise an exception.

      It is unexpected that the shell would conflate an authentication problem with the general class of network connection failures. Here's what clients see when all that's wrong is invalid credentials:

      *** It looks like this is a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network.
      

      It's unclear to me if this is expected behavior (it's confusing at best). If so, using a more generic error message instead of specifically offering that clients check their IP allowlist would be less confusing to users. If not, we should fix it.

            Assignee:
            robert.guo@mongodb.com Robert Guo (Inactive)
            Reporter:
            adinoyi.omuya@mongodb.com Adinoyi Omuya
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: