MongoError: not authorized on [dbName] to execute command { insert: \”[collectionName]\”, documents: …
Hi Francesco,
The error message indicates that the application user does not have the right permission to perform the operation. It is likely that either the application is not authenticating against the right database, or perhaps the users role has changed momentarily.
Make sure that the right user/password combination to authenticate with has the level of access the application requires and that the details in your connection string/options match those on the server. Also, check whether there has been any changes in regards to the user’s permission/roles.
Regards,
Wan.
Thank you very much for your response.
That's the weird thing, as far as I know the database and the user/role hasn't change. To fix the issue we just restarted the application with no changes to the database.
I thought it was maybe some transient issue of the connection between the database and the app and that the reported error maybe was hiding the real problem.
Luckly we haven't experienced again this issue.
Thank you so much.
Best Regards,
Francesco Rivola