Crash on scanning MongoDB
❯ docker logs -f webdb-webdb-1 0 database WebDB App running 5432 select * from pg_database where datistemplate = false 5432 postgres select * from information_schema.schemata 5432 postgres select table_schema, table_name, table_type from information_schema.tables This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: MongoServerError: not authorized on config to execute command { listCollections: 1, filter: {}, cursor: {}, nameOnly: false, authorizedCollections: false, lsid: { id: UUID("3973f12d-578e-4c0f-a8c3-14f3a8dd27f1") }, $db: "config" } at Connection.sendCommand (/usr/src/app/node_modules/mongodb/lib/cmap/connection.js:290:27) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Connection.command (/usr/src/app/node_modules/mongodb/lib/cmap/connection.js:317:26) at async Server.command (/usr/src/app/node_modules/mongodb/lib/sdam/server.js:167:29) at async ListCollectionsOperation.executeCommand (/usr/src/app/node_modules/mongodb/lib/operations/command.js:73:16) at async ListCollectionsOperation.execute (/usr/src/app/node_modules/mongodb/lib/operations/list_collections.js:26:16) at async tryOperation (/usr/src/app/node_modules/mongodb/lib/operations/execute_operation.js:199:20) at async executeOperation (/usr/src/app/node_modules/mongodb/lib/operations/execute_operation.js:69:16) at async ListCollectionsCursor._initialize (/usr/src/app/node_modules/mongodb/lib/cursor/list_collections_cursor.js:28:26) at async ListCollectionsCursor.cursorInit (/usr/src/app/node_modules/mongodb/lib/cursor/abstract_cursor.js:495:27) MongoServerError: not authorized on config to execute command { listCollections: 1, filter: {}, cursor: {}, nameOnly: false, authorizedCollections: false, lsid: { id: UUID("3973f12d-578e-4c0f-a8c3-14f3a8dd27f1") }, $db: "config" } at Connection.sendCommand (/usr/src/app/node_modules/mongodb/lib/cmap/connection.js:290:27) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Connection.command (/usr/src/app/node_modules/mongodb/lib/cmap/connection.js:317:26) at async Server.command (/usr/src/app/node_modules/mongodb/lib/sdam/server.js:167:29) at async ListCollectionsOperation.executeCommand (/usr/src/app/node_modules/mongodb/lib/operations/command.js:73:16) at async ListCollectionsOperation.execute (/usr/src/app/node_modules/mongodb/lib/operations/list_collections.js:26:16) at async tryOperation (/usr/src/app/node_modules/mongodb/lib/operations/execute_operation.js:199:20) at async executeOperation (/usr/src/app/node_modules/mongodb/lib/operations/execute_operation.js:69:16) at async ListCollectionsCursor._initialize (/usr/src/app/node_modules/mongodb/lib/cursor/list_collections_cursor.js:28:26) at async ListCollectionsCursor.cursorInit (/usr/src/app/node_modules/mongodb/lib/cursor/abstract_cursor.js:495:27) { errorResponse: { ok: 0, errmsg: 'not authorized on config to execute command { listCollections: 1, filter: {}, cursor: {}, nameOnly: false, authorizedCollections: false, lsid: { id: UUID("3973f12d-578e-4c0f-a8c3-14f3a8dd27f1") }, $db: "config" }', code: 13, codeName: 'Unauthorized' }, ok: 0, code: 13, codeName: 'Unauthorized', [Symbol(errorLabels)]: Set(0) {}
Can you tell me with which credentials you try to connect to MongoDB Tell me the user and his rights please
Why would you need to know my local account credentials? User has Admin rights though...
I try to reproduce the bug So you created an other user with admin rights ?
Yes, I did. And I validated the credentials separately. However I have to set the mongo admin db as the “owner“ of the account. Otherwise it doesn’t work. On a different note: how can I reset WebDB so that it doesn’t check the MongoDB every time I start the instance?
You can erase the local storage of your web browser or use another navigator/incognito