I have mongodb setup as standalone server. I also have replicaset enabled as standalone for enabling the oplog (my app tracks realtime updates).
This setup works fine. But randomly I get the error message no valid seed servers in list with connect-mongo throwing this error.
d:\Nodevue\nvweb\node_modules\connect-mongo\node_modules\mongodb\lib\mongo_clien t.js:393 throw err ^ MongoError: no valid seed servers in list
This is my connect-mongo connection string:
{
"url": "mongodb://localhost/dbname",
"autoReconnect": true,
"mongoOptions": {
"server": {
"auto_reconnect": true,
"poolSize": 20,
"socketOptions": {
"keepAlive": 1,
"connectTimeoutMS": 10000
}
},
"replset": {
"socketOptions": {
"keepAlive": 1,
"connectTimeoutMS": 10000
}
}
}
}
Any solutions?