宝塔用户_ywijmg 发表于 2023-10-12 10:59:26

【待反馈】安装mongodb,当外部写的时候没有权限使用,怎...

本帖最后由 堡塔运维小林 于 2023-10-12 14:05 编辑

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:
系统版本:
问题描述:
安装mongodb,当外部写的时候没有权限使用,怎么回事?
相关截图(日志、错误):
MongoServerError: not authorized on oops-framework to execute command { create: "counters", lsid: { id: UUID("ee6dfcfd-2218-4d3b-a3a2-694e2de22825") }, $db: "oops-framework" }
    at Connection.onMessage (/root/weChat/test7/dist/node_modules/mongodb/lib/cmap/connection.js:231:30)
    at MessageStream.<anonymous> (/root/weChat/test7/dist/node_modules/mongodb/lib/cmap/connection.js:61:60)
    at MessageStream.emit (node:events:527:28)
    at processIncomingData (/root/weChat/test7/dist/node_modules/mongodb/lib/cmap/message_stream.js:125:16)
    at MessageStream._write (/root/weChat/test7/dist/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at MessageStream.Writable.write (node:internal/streams/writable:334:10)
    at Socket.ondata (node:internal/streams/readable:754:22)
    at Socket.emit (node:events:527:28) {
ok: 0,
code: 13,
codeName: 'Unauthorized',

运维小林q3030251644 发表于 2023-10-12 14:05:34

您好,您指的是其他服务器上面连接本地服务器里面的mongodb吗?截图看一下您的mongodb是如果配置的

运维技术lcx 发表于 2024-3-6 10:54:29

您好,您的问题是否解决了呢

运维技术阿闯 发表于 2024-3-30 10:25:33

您好根据您的问题看起来是在执行创建操作时出现了权限验证错误,导致 MongoServerError 异常。具体地,在执行创建名为 "counters" 的集合时,由于缺乏对数据库 "oops-framework" 的执行权限,导致了未授权的错误。
具体您可以提供详细信息,这边帮您解决。
期待您的回复
页: [1]
查看完整版本: 【待反馈】安装mongodb,当外部写的时候没有权限使用,怎...