-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.0.6, 2.0.7, 2.0.8
-
Component/s: None
-
Labels:
-
Environment:Ubuntu 12.04.5 LTS
-
Empty show more show less
I'm trying to connect to replica set from Ubuntu using this:
return when.promise(function(resolve,reject){
new MongoClient().connect(url,
, function(err, db)
{ if (err) reject(err); resolve(db); });
});
Url looks like this:
'mongodb://mongo1.mysite.com:36108,mongo2.mysite.com:36108,mongo3.mysite.com:36108/db_name?w=0'
I'm connection to multiple databases and intermittently i see this error:
{ name: 'MongoError', message: 'no valid seed servers in list' }And node.js crashes.
I'm kind of lost at this point. And the main problem is that it works perfectly on MAC and i see this issue only on Ubuntu. I'm on the latest mongo driver for node.js
I took a look at the native driver source:
http://mongodb.github.io/node-mongodb-native/core/api/replset.js.html
and found out tha error being triggered by this condition (line 987): state.initialConnectionServers == 0 && state.replState.state == CONNECTING)
Still not sure why is this happening.