已将IP加入白名单仍无法连接MongoDB Atlas的问题求助
MongooseServerSelectionError 无法连接MongoDB Atlas集群
我遇到了MongooseServerSelectionError:无法连接MongoDB Atlas集群中的任何服务器。提示的常见原因是访问数据库的IP未加入白名单,我已通过公网IP查询工具获取自己的公网IP并将其加入Atlas集群的IP白名单,但运行服务器时仍出现以下错误:
at _handleConnectionErrors (C:\Users\Gigabyte\Desktop\3rdYear2ndSem\SoftEng\BatstateU-tenants\node_modules\mongoose\lib\connection.js:755:11) at NativeConnection.openUri (C:\Users\Gigabyte\Desktop\3rdYear2ndSem\SoftEng\BatstateU-tenants\node_modules\mongoose\lib\connection.js:730:11) at processTicksAndRejections (node:internal/process/task_queues:96:5)
{ reason: TopologyDescription { type: 'ReplicaSetNoPrimary', servers: Map(3) { 'ac-btvwsde-shard-00-00.vktogmw.mongodb.net:27017' => [ServerDescription], 'ac-btvwsde-shard-00-01.vktogmw.mongodb.net:27017' => [ServerDescription], 'ac-btvwsde-shard-00-02.vktogmw.mongodb.net:27017' => [ServerDescription] }, stale: false, compatible: true, heartbeatFrequencyMS: 10000, localThresholdMS: 15, setName: 'atlas-ze47mp-shard-0', maxElectionId: null, maxSetVersion: null, commonWireVersion: 0, logicalSessionTimeoutMinutes: null }, code: undefined }
内容的提问来源于stack exchange,提问作者Karl Aguilar
相关产品推荐
相关产品推荐

