-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
Mongoose v5.2.1
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Mongo connection error when trying to connect to MongoDB Atlas database..
{ MongoError: seed list contains no mongos proxies, replicaset connections requires the parameter replicaSet to be supplied in the URI or options object, mongodb://server:port/db?replicaSet=name
at connectCallback (/node_modules/mongodb/lib/operations/mongo_client_ops.js:236:23)
at process.nextTick (/node_modules/mongodb/lib/operations/mongo_client_ops.js:436:7)
at process._tickCallback (internal/process/next_tick.js:61:11)
name: 'MongoError',
message:
'seed list contains no mongos proxies, replicaset connections requires the parameter replicaSet to be supplied in the URI or options object, mongodb://server:port/db?replicaSet=name',
[Symbol(mongoErrorContextSymbol)]: {} }
If the current behavior is a bug, please provide the steps to reproduce.
- create a free tier database from MongoDB Atlas and try to use the connection string
mongoose.connect(process.env.MONGO_URL, {
reconnectTries: 100,
reconnectInterval: 500,
autoReconnect: true,
useNewUrlParser: true,
dbName: 'test'
})
.catch(err => console.log('Mongo connection error', err))
Where MONGO_URL looks like mongodb+srv://<username>:<password>@<url>?retryWrites=true
What is the expected behavior?
Should connect successfully
Please mention your node.js, mongoose and MongoDB version.
node v10.5.0
mongoose v5.2.1
mongodb v3.6.5
Metadata
Metadata
Assignees
Labels
No labels