You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the databasesources.json but I keep getting the error:
Connection fails: MongoError: Authentication failed.
It will be retried for the next request.
C:\Users \lms\node_modules\mongodb\lib\topologies\replset.js:368
throw err;
^
MongoError: Authentication failed.
at Function._getError (C:\Users \lms\node_modules\mongodb-core\lib\auth\scram.js:125:14)
at sendAuthCommand (C:\Users \lms\node_modules\mongodb-core\lib\auth\scram.js:175:31)
at Connection.messageHandler (C:\Users \lms\node_modules\mongodb-core\lib\connection\connect.js:334:5)
at Connection.emit (events.js:189:13)
at processMessage (C:\Users \lms\node_modules\mongodb-core\lib\connection\connection.js:364:10)
at TLSSocket.<anonymous> (C:\Users \lms\node_modules\mongodb-core\lib\connection\connection.js:533:15)
at TLSSocket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at TLSSocket.Readable.push (_stream_readable.js:220:10)
at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
Emitted 'error' event at:
at DataSource.postInit (C:\Users \lms\node_modules\loopback-datasource-juggler\lib\datasource.js:480:16)
at C:\Users \lms\node_modules\loopback-connector-mongodb\lib\mongodb.js:320:23
at err (C:\Users \lms\node_modules\mongodb\lib\utils.js:411:14)
at executeCallback (C:\Users \lms\node_modules\mongodb\lib\utils.js:401:25)
at err (C:\Users \lms\node_modules\mongodb\lib\operations\mongo_client_ops.js:285:21)
at connectCallback (C:\Users \lms\node_modules\mongodb\lib\operations\mongo_client_ops.js:265:5)
at topology.connect (C:\Users \lms\node_modules\mongodb\lib\operations\mongo_client_ops.js:413:14)
at ReplSet.<anonymous> (C:\Users \lms\node_modules\mongodb\lib\topologies\replset.js:364:11)
at Object.onceWrapper (events.js:277:13)
at ReplSet.emit (events.js:189:13)
at C:\Users \lms\node_modules\mongodb-core\lib\topologies\replset.js:609:23
at Server.<anonymous> (C:\Users \lms\node_modules\mongodb-core\lib\topologies\replset.js:336:9)
at Object.onceWrapper (events.js:277:13)
at Server.emit (events.js:189:13)
at Pool.<anonymous> (C:\Users \lms\node_modules\mongodb-core\lib\topologies\server.js:452:12)
at Pool.emit (events.js:189:13)
@kg551915, there was a PR got merged related to connecting with mongodb+srv protocol: #497, which might fix your issue. We're planning to make a release soon.
@b-admike, I know you have 2 PRs that you want to land soon, just wondering if we'd be able to release this week. There are a few people already waiting for the mongodb+srv protocol fix. I'm thinking whether it makes sense to make a release without your PRs.
Description/Steps to reproduce
Using Loopback 3.x with loopback-connector-mongodb
I tried defining:
In the databasesources.json but I keep getting the error:
Expected result
Expected a connection to MongoDB database.
Additional information
win32 x64 10.15.3
+-- loopback@3.25.1
+-- loopback-boot@2.28.0
+-- loopback-component-explorer@6.3.1
+-- loopback-connector-mongodb@4.1.0
The text was updated successfully, but these errors were encountered: