Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4527

Multiple mongos connections

    • Type: Icon: Investigation Investigation
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.31.0
    • Affects Version/s: None
    • Component/s: Connectivity
    • None
    • Not Needed

      Problem Description

      When connecting to a mongodb+srv that contains multiple mongos Compass is attempting to connect to all the members of theĀ _mongodb._tcp hosts.
      For some users that uses 2 factor authentication such as Okta, every connection to a mongodb+srv will prompt confirmation for all hosts (as they don't share the same ip)

      Steps to Reproduce

      Setup a shard with 4 mongos and attempt to connect using Compass client. It will open one connection for each mongos.

      The same is not true for our mongo shell client, the shell client will only connect to one mongos instead.

      Expected Results

      We expect Compass to only perform authentication in one mongos instead of in all.

      Actual Results

      Compass opens connections to all the mongos and perform authentication in all of those

      Additional Notes

      The same is true for non LDAP authentication, however only users with LDAP configured to two factor authentication are affected.

      The current workaround is specifying a single mongos in the connection uri ignoring the srv dns.

            Assignee:
            felicia.hsieh@mongodb.com Felicia Hsieh
            Reporter:
            adamo.tonete@mongodb.com Adamo Tonete (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: