更新时间:2023-06-14 gmt 08:00
连接失败,提示:authentication failed-凯发k8国际娱乐官网入口
问题描述
使用如下命令连接dds实例时报错。
mongo --host 192.168.168.116 --port 8635 -u rwuser -p xxxxxxxxx --authenticationdatabase admin --ssl --sslcafile /root/ca.crt --sslallowinvalidhostnames
报错信息如下:
mongodb shell version v3.4.17 connecting to: mongodb://192.168.168.116:8635/ 2019-09-19t09:39:24.306 0800 w network [thread1] the server certificate does not match the host name. hostname: 192.168.168.116 does not match cn: 172.16.2.65 mongodb server version: 4.0.3 warning: shell and server versions do not match 2019-09-19t09:39:24.329 0800 e query [thread1] error: authentication failed. : db.prototype._authorthrow@src/mongo/shell/db.js:1461:20 @(auth):6:1 @(auth):1:2 exception: login failed
可能原因
连接dds实例时需要输入管理员密码,管理员密码输入错误提示“authentication failed”。
排查思路
检查连接dds实例的命令中管理员的密码是否正确。
处理方法
- 请重新输入正确的管理员密码。
- 如果您忘记了密码,可以单击实例名称,在基本信息页面,单击“重置密码”,通过dds控制台重置密码。
图1 重置密码
后面的
意见反馈
文档内容是否对您有帮助?
提交成功!非常感谢您的反馈,我们会继续努力做到更好!
您可在查看反馈及问题处理状态。
系统繁忙,请稍后重试
如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨