[SERVER-51139] Can't connect to mongodb.Could not connect to any servers in your MongoDB Atlas cluster Created: 24/Sep/20  Updated: 21/Aug/21  Resolved: 24/Sep/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: myth saziv Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

while trying to connect with mongodb i'm getting this error :
 
{{MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common
reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/
at NativeConnection.Connection.openUri (D:\Node-Jonas\Node-Projects\node_modules\mongoose\lib\connection.js:828:32)
at Mongoose.connect (D:\Node-Jonas\Node-Projects\node_modules\mongoose\lib\index.js:335:15)
at Object.<anonymous> (D:\Node-Jonas\Node-Projects\server.js:21:4)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
reason: TopologyDescription {
type: 'ReplicaSetNoPrimary',
setName: null,
maxSetVersion: null,
maxElectionId: null,
servers: Map

{ 'cluster0-shard-00-00-g4ttz.mongodb.net:27017' => [ServerDescription], 'cluster0-shard-00-01-g4ttz.mongodb.net:27017' => [ServerDescription] }

,
stale: false,
compatible: true,
compatibilityError: null,
logicalSessionTimeoutMinutes: null,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
commonWireVersion: null
}
}}}

i already whitelisted my ip but still getting the problem.also can't connect to compass. it was all fine even yesterday and so don't know why all of suuden this problem occured.need help.Thanks



 Comments   
Comment by David Manoharan [ 21/Aug/21 ]

Is this issue resolved ? I am also getting the same error? What is the way to correct it?

Comment by myth saziv [ 24/Sep/20 ]

Thanks Eric.

Comment by Eric Sedor [ 24/Sep/20 ]

HI myth.saziv@gmail.com,

The SERVER project is for bugs and feature suggestions for the MongoDB server. To inform our Atlas team of issues you are having or feature requests you'd like to suggest, please reach out to the Atlas support team via Intercom. You can do this by clicking the round green button at the bottom right of the cluster view page in Atlas.

Sincerely,
Eric

Generated at Thu Feb 08 05:24:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.