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

Connect To Secondary "not authorized" (possible regression)

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.8.2, 1.16.4
    • Component/s: Connectivity
    • None

      Hello,

      A customer is reporting an issue while connecting to a mongoS (shard) with read preference Secondary:

      The MongoDB instance you are connected to does not contain any collections, or you are not authorized to view them.
      

      Compass works correctly if connecting to the Primary.

      I have managed to reproduce the issue:

      Hostname: agents.foobar.com
      Port: 27200
      Authentication: Username/Password
      Authentication Database: test
      Replica Set Name: test
      Read Preference: Secondary
      SSL: off
      SSH Tunnel: off
      

      Console Debug Log

      /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/debug/lib/browser-consol...:105 mongodb-instance-model:fetch checking we can get buildInfo... +0ms
      /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/debug/lib/browser-consol...:105 mongodb-instance-model:fetch user does not have hostInfo privilege, returning empty document {} +55ms
      /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/debug/lib/browser-consol...:105 mongodb-instance-model:fetch Command "usersInfo" could not be retrieved: "$queryOptions" is not a valid argument to usersInfo +9ms
      /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/debug/lib/browser-consol...:105 mongodb-instance-model:fetch allowed collections +1ms []
      /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/debug/lib/browser-consol...:105 mongodb-instance-model:fetch listDatabases failed. returning empty list [] +4ms
      

      Similar bug fixed in 1.8.0 version: COMPASS-1234

      Thank you

        1. Compass_1_16_3_to_Community_3_4_19_via_mongos_for_readonly.png
          126 kB
          Brian Blevins
        2. Compass_1_16_3_to_Community_3_6_10_via_mongos_for_readonly.png
          81 kB
          Brian Blevins
        3. Compass_3_16_4_to_Community_3_4_13_via_mongos_for_readonly.png
          102 kB
          Brian Blevins
        4. Screen Shot 2017-09-06 at 11.15.00.png
          241 kB
          Davide De Angelis
        5. Screen Shot 2017-09-06 at 11.15.49.png
          64 kB
          Davide De Angelis

            Assignee:
            lucas.hrabovsky Lucas Hrabovsky (Inactive)
            Reporter:
            davide.deangelis@mongodb.com Davide De Angelis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: