-
Type: Bug
-
Resolution: Fixed
-
Priority: Blocker - P1
-
None
-
Affects Version/s: 2.1.16
-
Component/s: MongoDB 3.2
-
Environment:Nodejs, MongoDB server version: 3.2.11
-
Empty show more show less
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