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

Regression: getting "no valid replicaset members found" in 2.2.0, worked in 2.1.21

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.2.1
    • Affects Version/s: 2.2.0
    • Component/s: None
    • Environment:
      Node v4.3, mongodb@2.2.0, connecting to a Mongo 3.0 database

      I recently upgraded to mongodb npm module version 2.2.0 (from 2.1.21) and now get "no valid replicaset members found" when trying to connect a Mongo 3.0 database.

      Repro steps:

      $ npm install mongodb@2.2.0
      $ node
      > var MongoClient = require('mongodb').MongoClient
      > MongoClient.connect('mongodb://appuser:<redacted>@candidate.2.mongolayer.com:10411,candidate.3.mongolayer.com:10649/app?replicaSet=set-56be39f36887897ebf0037db', (err, db) =>

      { console.log(err, !!db); }

      )

      { [MongoError: no valid replicaset members found] name: 'MongoError', message: 'no valid replicaset members found' }

      false

      Same test with 2.1.21 - it works:

      $ npm install mongodb@2.1.21
      $ node
      > var MongoClient = require('mongodb').MongoClient
      > MongoClient.connect('mongodb://appuser:<redacted>@candidate.2.mongolayer.com:10411,candidate.3.mongolayer.com:10649/app?replicaSet=set-56be39f36887897ebf0037db', (err, db) =>

      { console.log(err,!!db); }

      )
      null true

      I couldn't find documentation on if there were API changes in 2.2.0?

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            brad@mixmax.com Brad Vogel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: