文档数据库服务 DDS-连接失败,提示:Authentication failed:问题描述

时间:2023-11-01 16:18:26

问题描述

使用如下命令连接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.17connecting 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.65MongoDB server version: 4.0.3WARNING: shell and server versions do not match2019-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:2exception: login failed
support.huaweicloud.com/trouble-dds/dds_03_troubleshoot_0003.html