MongoDB ingestion failure: ```OperationFailure: n...
# ingestion
w
MongoDB ingestion failure:
Copy code
OperationFailure: not authorized on db_kg to execute command { aggregate: "system.views", pipeline: [ { $sample: { size: 100 } } ], allowDiskUse: true, cursor: {}, lsid: { id: UUID("305f9d4f-fd8b-4fbd-8cf6-9257c4399403") }, $clusterTime: { clusterTime: Timestamp(1634193294, 4), signature: { hash: BinData(0, 9B140107B447AC1BFBE704B411400CF7EEF4E04D), keyId: 7012684930027094017 } }, $db: "db_kg", $readPreference: { mode: "primaryPreferred" } }, full error: {'operationTime': Timestamp(1634193295, 1), 'ok': 0.0, 'errmsg': 'not authorized on db_kg to execute command { aggregate: "system.views", pipeline: [ { $sample: { size: 100 } } ], allowDiskUse: true, cursor: {}, lsid: { id: UUID("305f9d4f-fd8b-4fbd-8cf6-9257c4399403") }, $clusterTime: { clusterTime: Timestamp(1634193294, 4), signature: { hash: BinData(0, 9B140107B447AC1BFBE704B411400CF7EEF4E04D), keyId: 7012684930027094017 } }, $db: "db_kg", $readPreference: { mode: "primaryPreferred" } }', 'code': 13, 'codeName': 'Unauthorized', '$clusterTime': {'clusterTime': Timestamp(1634193295, 1), 'signature': {'hash': b'\x8f\x98\x0b\x97l\xbd\xab\x96\xcc\x91\x14QQ7\xc8)d\xd7W"', 'keyId': 7012684930027094017}}}
sample size is just 100:
schemaSamplingSize: 100
What does ingestion's schema inference need to execute
aggregate: "system.views",
?
Found out that it's related to the permissions to the mongodb user account. Got the permissions right from the owner of the DB and now metadata ingestion worked fine.
2
b
Is this permission not present in the Mongo DB source documentation? If not, we should add it
w
no, it's not present in the documentation for metadata-ingestion from mongodb source. The thing is that even admin account doesn't have this permission by default. https://jira.mongodb.org/browse/SERVER-27554?focusedCommentId=1467284&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#c[…]84
b
No kidding! Great info here. Think its important we add this to docs
🙂 1