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

Getting `authentication fail` error with new version 2.1.16 when using mongodb-js library

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 2.1.16
    • Component/s: MongoDB 3.2
    • Environment:
      Nodejs, MongoDB server version: 3.2.11

      Getting following authentication error when connecting to mongoDB instance in compose.io.

      This worked fine with mongodb-js version 2.1.15 Something changed in 2.1.16 that broke this authentication.

      { MongoError: authentication fail
      at Function.MongoError.create (/app/node_modules/mongodb-core/lib/error.js:31:11)
      at /app/node_modules/mongodb-core/lib/topologies/mongos.js:1024:38
      at /app/node_modules/mongodb-core/lib/connection/pool.js:760:7
      at /app/node_modules/mongodb-core/lib/connection/pool.js:738:11
      at finish (/app/node_modules/mongodb-core/lib/auth/scram.js:157:16)
      at handleEnd (/app/node_modules/mongodb-core/lib/auth/scram.js:170:7)
      at /app/node_modules/mongodb-core/lib/auth/scram.js:258:13
      at /app/node_modules/mongodb-core/lib/connection/pool.js:469:18
      at _combinedTickCallback (internal/process/next_tick.js:131:7)
      at process._tickCallback (internal/process/next_tick.js:180:9)
      name: 'MongoError',
      message: 'authentication fail',
      errors:
      [

      Unknown macro: { name}

      ] }

      The connection string used is the following (username and password X-ed out for obvious reasons)

      mongodb://XXX:XXX@sl-us-south-1-portal.4.dblayer.com:18349,sl-us-south-1-portal.5.dblayer.com:18349/3pm-appdirect-db?ssl=true

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            hiro5id Robert Sebestyen
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: