Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-323

'no valid seed servers in list' when using MongoClient.connect() for replica set on Ubuntu

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 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

      I'm trying to connect to replica set from Ubuntu using this:

      return when.promise(function(resolve,reject){
      new MongoClient().connect(url,

      {replSet: options }

      , 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.

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            rinchik Rinat Ussenov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: