Getting error in movies database "not authorized...."

I’m getting this error when I run any query, even the more simple like ‘db.movies.findOne();’

The full reported error is:

2018-10-27T12:57:33.930+0200 E QUERY [js] Error: error: {
“operationTime” : Timestamp(1540637853, 9),
“ok” : 0,
“errmsg” : “not authorized on video to execute command { find: “movies”, filter: {}, limit: 1.0, singleBatch: true, lsid: { id: UUID(“661101d1-8a2c-49a3-9c2a-50323c735115”) }, $clusterTime: { clusterTime: Timestamp(1540637780, 1), signature: { hash: BinData(0, 8FF3B05A3DD095F4A6AD4BE53AD74F1E575728C5), keyId: 6559514413705986049 } }, $db: “video” }”,
“code” : 13,
“codeName” : “Unauthorized”,
“$clusterTime” : {
“clusterTime” : Timestamp(1540637853, 9),
“signature” : {
“hash” : BinData(0,“DrU8GcjOCM42azBFd617oFsDf6k=”),
“keyId” : NumberLong(“6559514413705986049”)
}
}
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DBCommandCursor@src/mongo/shell/query.js:708:1
DBQuery.prototype._exec@src/mongo/shell/query.js:113:28
DBQuery.prototype.hasNext@src/mongo/shell/query.js:288:5
DBCollection.prototype.findOne@src/mongo/shell/collection.js:260:10
@(shell):1:1

Sorry, my fault, I’m not using the correct database…

Hi,

Glad you figured it out. You were connected to the video database instead of the aggregations one.

José Carlos

1 Like