我正在尝试使用 MongoDB Compass 连接到 DocumentDB 实例。我没有使用 root 用户,而是仅对一个特定数据库具有读/写访问权限的用户。我指定
authSource
并在 URI 中指定要连接的数据库。当我连接时,我收到“授权失败”错误:
但是应用内
mongosh
控制台工作得很好:
如果我在搜索框中键入并删除,数据库和集合会出现在 GUI 中,但是当我尝试访问其中任何一个时,它不会执行任何操作,并且在开发人员控制台中会引发以下错误:
Uncaught (in promise) TypeError: Invalid Version: undefined
at new W (374.b19c47bda474faa622ac.renderer.js:2)
at K (374.b19c47bda474faa622ac.renderer.js:2)
at Function.ee [as gte] (374.b19c47bda474faa622ac.renderer.js:2)
at i (index-4d5b3902.00103f1fccf1df6cf12c.renderer.js:1)
at Object.Ye [as configureStore] (index-4d5b3902.00103f1fccf1df6cf12c.renderer.js:1)
at f (index-7aeafcb2.6cd34d3932bd058955c3.renderer.js:1)
at index-7aeafcb2.6cd34d3932bd058955c3.renderer.js:1
at Array.forEach (<anonymous>)
at b (index-7aeafcb2.6cd34d3932bd058955c3.renderer.js:1)
at index-7aeafcb2.6cd34d3932bd058955c3.renderer.js:1
在 MongoDB Compass 日志中,我看到的唯一错误是:
{
"msg": "Driver command failed",
"attr": {
"address": "xxxxxxx:27017",
"serverConnectionId": 1,
"duration": 215,
"commandName": "getParameter",
"failure": "Feature not supported: getParameter"
}
}
这是某种 MongoDB Compass 错误吗? Compass 和 DocumentDB 之间不兼容吗?或者可能与添加到我尝试进行身份验证的用户角色中的权限有关?
谢谢大家。
检查此页面:https://www.mongodb.com/docs/compass/current/connect/required-access/ 我相信您将需要您正在使用的受限用户的 clusterMonitor 角色。
有人解决这个问题了吗?如果是,请帮我完成步骤