Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6996

Unauthorized command execution error received for Mongo

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.15.0
    • Fix Version/s: None
    • Component/s: Storage - MongoDB
    • Labels:
      None

      Description

      We recently upgraded from 1.13 to 1.15 for the support of Decimal128 between Drill and some of our Mongo dbs. We are now receiving a MongoCommandException error when trying to query a Mongo db. No auth settings have been changed for the previously working login, and the same login is able to execute the command through Robo 3T.

      Running in embedded mode.

      Storage:

      { "type": "mongo", "connection": "mongodb://[user]:[pass]@[host1]:[port1],[host2]:[port2],[host3]:[port3]/[db]?authMechanism=SCRAM-SHA-1&ssl=true&replicaSet=[set]", "enabled": true }

      Query: 

      SELECT _id FROM  [storage].[db].[collection];

      Error:

      Error: SYSTEM ERROR: MongoCommandException: Command failed with error 13 (Unauthorized): 'not authorized on [db] to execute command { count: "[collection]", query: {} }' on server [host1]:[port1]. The full response is { "ok" : 0.0, "errmsg" : "not authorized on [db] to execute command { count: \"[collection]\", query: {} }", "code" : 13, "codeName" : "Unauthorized" }

      Successful Robo command:

      db.runCommand({
      count: "[collection]",
      query: {}
      })

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Kris Dalpiaz Kris Dalpiaz
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: