Open Joshua-alt opened 1 month ago
I am facing the same issue.
For me:
Breaks on version 8.7.0 Works on 8.5.2
worked for me too!! thank u very much i was going INSANE
What version of the MongoDB server are you running in Atlas?
@vkarpov15
7.0.12
7.0.14
Yes, "mongoose": "^7.0.12" is working for me. Thank you @akang!
A couple of potential suggestions:
encodeURIComponent()
? err.reason
where err
is the MongooseServerSelectionError
?We have no issues with mongoose 8.6.4 and mongodb 7.0.12 on mongodb atlas.
Same behaviour here....mongoose 8.7.0 and mongodb atlas 8.0.0
Same! Atlas 7.0.14 Fixed by rolling back to mongoose 8.6.1.
Strange we also use Atlas 7.0.14 now and mongoose 8.6.4 without this connection issue.
How do you guys connect to the server ?
mongodb+srv://DB-USER:PASSWORD@ATLAS-INSTANCE-NAME.dyvqc.mongodb.net/?retryWrites=true&w=majority
serverSelectionTimeoutMS
is set to 5000 ms
And the DB name is not included in the URL option, it is passed separately through the mongoose dbName
option.
We only use linux and macOS maybe this is a windows issue ?
We only use linux and macOS maybe this is a windows issue ?
Nope. I came with this issue on deployment, obviously on linux server.
I tried with a separate dbName
option and no dbname in the connection string, I'm still able to connect successfully to Atlas with Mongoose 8.7. @angelosnm are you able to provide any additional information?
I tried with a separate
dbName
option and no dbname in the connection string, I'm still able to connect successfully to Atlas with Mongoose 8.7. @angelosnm are you able to provide any additional information?
I still had issues. What fixed it was downgrading package version.
been battling the same Issue. Downgrading the Mongoose package version fixed it @angelosnm
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days
Prerequisites
Mongoose version
8
Node.js version
18.14.1
MongoDB server version
MongoDB Atlas
Typescript version (if applicable)
No response
Description
I’m encountering a problem connecting to MongoDB Atlas, even though I’ve allowed network access for everyone by adding ‘0.0.0.0/0’ to the IP whitelist using mongoose v8
Steps to Reproduce
to get issue that i show in description can be done by install mongoose 8v then connect it with mongodb atlas and to fixe required to back on "mongoose": "^7.3.2" version that for me is working fine
Expected Behavior
I’m encountering a problem connecting to MongoDB Atlas, even though I’ve allowed network access for everyone by adding ‘0.0.0.0/0’ to the IP whitelist. When attempting to connect, I consistently receive the following error message: ‘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