直接用的mongdb控制台页面给的命令:mongo --host *****.mongodb.rds.aliyuncs.com:3717 --authenticationDatabase admin -u root -p
输入密码后,错误为:
W NETWORK [thread1] Failed to connect to *******:3717 after 5000ms milliseconds, giving up.
E QUERY [thread1] Error: couldn't connect to server ********.mongodb.rds.aliyuncs.com:3717, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
该怎么解决啊?
- dongshan8
题主您好,
请问在您的ECS实例里,能ping通mongodb的连接地址吗?
这个问题我也遇到了,我可以确认有这个问题,而且在ECS里面无法ping通MongoDB服务器,添加内网外网IP地址到白名单都不行,但是在我把MongoDB的网络类型从经典网络切换到与ECS所在的VPC网络之后一切都正常了