gpt4 book ai didi

mongodb - openshift 上的 jbossews 日志显示 com.mongodb.CommandFailureException :{ "serverUsed" :"127.xx2.xxx.xx0:27017" ,"ok":0. 0 ,"errmsg":"unauthorized"}

转载 作者:行者123 更新时间:2023-11-28 23:31:40 24 4
gpt4 key购买 nike

jbossews.log 段:

Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "127.xxx.xx3.xx0:27018" , "ok" : 0.0 , "errmsg" : "unauthorized"} at com.mongodb.CommandResult.getException(CommandResult.java:76) at com.mongodb.CommandResult.throwOnError(CommandResult.java:131)

mongodb.log 段:我认为它给了我上述异常,因为“command denied: { listDatabases: 1 }”行。

Sun Apr 12 12:30:24.150 [conn1] authenticate db: admin { authenticate: 1, nonce: "#####", user: "admin", key: "*" }
Sun Apr 12 12:31:54.580 [conn3] authenticate db: mydb { authenticate: 1, user: "admin", nonce: "#######", key: "#######" }
Sun Apr 12 12:31:54.582 [conn3] command denied: { listDatabases: 1 }
Sun Apr 12 13:20:14.781 [conn4] authenticate db: admin { authenticate: 1, user: "admin", nonce: "######", key: "#######" }
Sun Apr 12 13:20:15.031 [conn4] command mydb.$cmd command: { $eval: CodeWScope( function (){ return db.getCollectionNames(); }, {}), args: {} } ntoreturn:1 keyUpdates:0 locks(micros) W:223980 reslen:109 224ms
Sun Apr 12 13:20:15.141 [conn5] authenticate db: admin { authenticate: 1, user: "admin", nonce: "######", key: "#######" }

我错过了什么?任何帮助将不胜感激。

最佳答案

如果您使用了 mongodb 墨盒,您的用户名和密码应该与墨盒安装放置在环境变量中的用户名和密码相匹配。请使用它们,看看您是否遇到相同的错误。

这是一个验证码的例子——你在做类似的事情吗?

https://github.com/thesteve0/javaparks/blob/master/src/main/java/org/openshift/data/DBConnection.java

关于mongodb - openshift 上的 jbossews 日志显示 com.mongodb.CommandFailureException :{ "serverUsed" :"127.xx2.xxx.xx0:27017" ,"ok":0. 0 ,"errmsg":"unauthorized"},我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29593178/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com