I am hosting a meteor application at galaxy.meteor.com and was planning to use a mongolab.com (mlab.com) database with this app, as recommended by the galaxy developers. Unfortunately, I cannot connect my application to the mlab database. The following is my settings.json file:
{ "galaxy.meteor.com": {
"env": {
"ROOT_URL": "http://<appname>.meteorapp.com/",
"MONGO_URL": "mongodb://<dbuser>:<dbpassword>@ds<123456>-a0.mlab.com:<123456>,<ds123456>-a1.mlab.com:<123456>/<dbname>?replicaSet=rs-ds<123456>",
"MONGO_OPLOG_URL": "mongodb://<oplog-reader-name>:<oploguserpassword>@ds<123456>-a0.mlab.com:<123456>,ds<123456>-a1.mlab.com:<123456>/admin?replicaSet=rs-ds<123456>"
}
}}
The Meteor logs show the following problem:
2xkx 2016-03-20 22:37:50+01:00 Exception in callback of async function: MongoError: auth failed 2xkx 2016-03-20 22:37:50+01:00 at Object.toError (/app/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/utils.js:110:11) 2xkx 2016-03-20 22:37:50+01:00 at /app/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1128:31 2xkx 2016-03-20 22:37:50+01:00 at /app/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1843:9 2xkx 2016-03-20 22:37:50+01:00 at Server.Base._callHandler (/app/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/base.js:445:41) 2xkx 2016-03-20 22:37:50+01:00 at /app/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/server.js:468:18 2xkx 2016-03-20 22:37:50+01:00 at [object Object].MongoReply.parseBody (/app/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5) 2xkx 2016-03-20 22:37:50+01:00 at [object Object]. (/app/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/server.js:426:20) 2xkx 2016-03-20 22:37:50+01:00 at [object Object].emit (events.js:95:17) 2xkx 2016-03-20 22:37:50+01:00 at [object Object]. (/app/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:201:13) 2xkx 2016-03-20 22:37:50+01:00 at [object Object].emit (events.js:98:17)
The mongodb-logs display the error as follows.
Failed to authenticate dbusername@dbname with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document
Any suggestions? Thanks
<>in there. Usually we use these in documentation to specify the elements and "variables" that need to be replaced in a string. Especially since you have them all over your port assignments, have you actually left those in your URI strings? If so then they are not meant to be there, so strip them out. - Blakes Sevenoplog_tailing.js. Hopefully someone replies here with an answer. - Shane Reustle2016-03-21T11:43:34.234-0700 I ACCESS [conn133] SCRAM-SHA-1 authentication failed for oplog-reader on local from client <ip-address> ; UserNotFound Could not find user oplog-reader@local. So it must be something to do with not authenticating with the proper db. Like @pneumee below said, authSource should work but it doesn't for some reason. If this isn't helpful for you, maybe it will help someone from google. Lots of people converting to Galaxy right now :) - Shane Reustle