简体   繁体   English

带有身份验证错误的 MongoDB Atlas 集群连接问题

[英]MongoDB Atlas Cluster Connection Problem with Authentication Error

I am not able to connect to the mongoDB Atlas cluster that I have made.我无法连接到我制作的 mongoDB Atlas 集群。 I entered in the given line of code after I created the cluster and recieved the error:在创建集群并收到错误后,我输入了给定的代码行:

I am not able to find any solution to this problem.我无法找到解决此问题的任何方法。 Please help me.请帮我。

MongoDB shell version v4.2.0
Enter password: Cannot get console mode 6
connecting to: mongodb://cluster0-shard-00-01-jigfx.mongodb.net:27017,cluster0-shard-00-02-jigfx.mongodb.net:27017,cluster0-shard-00-00-jigfx.mongodb.net:27017/test?authSource=admin&compressors=disabled&gssapiServiceName=mongodb&replicaSet=Cluster0-shard-0&ssl=true
2019-09-03T17:07:19.299-0400 I  NETWORK  [js] Starting new replica set monitor for Cluster0-shard-0/cluster0-shard-00-01-jigfx.mongodb.net:27017,cluster0-shard-00-02-jigfx.mongodb.net:27017,cluster0-shard-00-00-jigfx.mongodb.net:27017
2019-09-03T17:07:19.300-0400 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-01-jigfx.mongodb.net:27017
2019-09-03T17:07:19.300-0400 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-02-jigfx.mongodb.net:27017
2019-09-03T17:07:19.300-0400 I  CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-00-jigfx.mongodb.net:27017
2019-09-03T17:07:20.099-0400 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] 
Confirmed replica set for Cluster0-shard-0 is Cluster0-shard-0/cluster0-shard-00-00-jigfx.mongodb.net:27017,cluster0-shard-00-01-jigfx.mongodb.net:27017,cluster0-shard-00-02-jigfx.mongodb.net:27017
2019-09-03T17:07:20.719-0400 I  NETWORK  [js] Marking host cluster0-shard-00-00-jigfx.mongodb.net:27017 as failed :: caused by :: Location40659:can't connect to new replica set master [cluster0-shard-00-00-jigfx.mongodb.net:27017], err: AuthenticationFailed: Missing expected field "pwd"


*** It looks like this is a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network.


2019-09-03T17:07:21.522-0400 E  QUERY    [js] Error: Missing expected field "pwd" :
connect@src/mongo/shell/mongo.js:341:17
@(connect):2:6
2019-09-03T17:07:21.524-0400 F  -        [main] exception: connect failed
2019-09-03T17:07:21.524-0400 E  -        [main] exiting with code 1

The expected result is a prompt that asks me for the password to connect to the cluster, but the prompt instantly responds with Cannot get console mode 6预期的结果是提示我输入连接集群的密码,但是提示立即响应Cannot get console mode 6

尝试在命令末尾添加--password ****

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM