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

            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: