我在Aws上使用parse.com配置了MongoDB Atlas,为MongoDB Atlas Cluster完成了配置。我可以使用SSH连接到Mongo Atlas集群,并且我还可以使用localhost parse.com库连接到Mongo Atlas Cluster。但是当我尝试使用AWS上的解析服务器连接到Mongo Atlas时会出现以下错误
Uncaught internal server error. { MongoError: no valid replicaset members found
at Timeout._onTimeout (/var/application/juicebarParse/parse-server/node_modules/mongodb-core/lib/topologies/replset.js:660:33)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5) name: 'MongoError'
message: 'no valid replicaset members found' } MongoError: no valid
replicaset members found
at Timeout._onTimeout (/var/application/juicebarParse/parse-server/node_modules/mongodb-core/lib/topologies/replset.js:660:33)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
下面是我的连接字符串
mongodb://crajput:[email protected]:27017,cluster0-shard-00-01-qhwh9.mongodb.net:27017,cluster0-shard-00-02-qhwh9.mongodb.net:27017/DB_NAME?replicaSet=Cluster0-shard-0&authSource=admin&ssl=true
将解析服务器更新到最新版本解决了此问题。