Meteor deploy success but when entering url I got 502 Bad Gateway


#1

1.entering url with chrome
url: http://zqy-dzf.meteorapp.com/
feedback: 502 Bad Gateway: Registered endpoints failed to handle the request.

2.settings.json inside my app
{
galaxy.meteor.com”: {
“env”: {
“MONGO_URL”: “mongodb://:<123>@ds025603.mlab.com:25603/appdb”
}
}
}

3.deploy command
C:\Users\2015044\Desktop\zqy-dzf>meteor deploy [zqy-dzf.meteorapp.com] --setting
s C:/Users/2015044/Desktop/zqy-dzf/settings.json

4.successful deployed
App starting at zqy-dzf.meteorapp.com in carol1992’s account.
Visit https://galaxy.meteor.com/app/zqy-dzf.meteorapp.com to check the
status of your app.

5.I check the log file
2016-06-08 16:23:58+08:00Application process starting, version: 1 on apprunner mdg0/apprunner:release_20160602T205544Z_6a9798d
hnjp
2016-06-08 16:24:04+08:00
hnjp
2016-06-08 16:24:04+08:00/app/bundle/programs/server/node_modules/fibers/future.js:278
hnjp
2016-06-08 16:24:04+08:00 throw(ex);
hnjp
2016-06-08 16:24:04+08:00 ^
hnjp
2016-06-08 16:24:05+08:00MongoError: Authentication failed.emphasized text
hnjp
2016-06-08 16:24:05+08:00 at Object.Future.wait (/app/bundle/programs/server/node_modules/fibers/future.js:398:15)
hnjp
2016-06-08 16:24:05+08:00 at new MongoConnection (packages/mongo/mongo_driver.js:213:27)
hnjp
2016-06-08 16:24:05+08:00 at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
hnjp
2016-06-08 16:24:05+08:00 at Object. (packages/mongo/remote_collection_driver.js:38:10)
hnjp
2016-06-08 16:24:05+08:00 at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
hnjp
2016-06-08 16:24:05+08:00 at new Mongo.Collection (packages/mongo/collection.js:102:40)
hnjp
2016-06-08 16:24:05+08:00 at meteorInstall.lib.collections.js (lib/collections.js:2:12)
hnjp
2016-06-08 16:24:05+08:00 at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
hnjp
2016-06-08 16:24:05+08:00 at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
hnjp
2016-06-08 16:24:05+08:00 at /app/bundle/programs/server/app/app.js:484:1
hnjp
2016-06-08 16:24:05+08:00 - - - - -
hnjp
2016-06-08 16:24:05+08:00 at Object.toError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/utils.js:114:11)
hnjp
2016-06-08 16:24:05+08:00 at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/db.js:1196:31
hnjp
2016-06-08 16:24:05+08:00 at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/db.js:1905:9
hnjp
2016-06-08 16:24:05+08:00 at Server.Base._callHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
hnjp
2016-06-08 16:24:05+08:00 at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:488:18
hnjp
2016-06-08 16:24:05+08:00 at [object Object].MongoReply.parseBody (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
hnjp
2016-06-08 16:24:05+08:00 at [object Object]. (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:446:20)
hnjp
2016-06-08 16:24:05+08:00 at [object Object].emit (events.js:95:17)
hnjp
2016-06-08 16:24:05+08:00 at [object Object]. (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
hnjp
2016-06-08 16:24:05+08:00 at [object Object].emit (events.js:98:17)
hnjp
2016-06-08 16:24:05+08:00Application exited with code: 8 signal: null
hnjp
2016-06-08 16:24:05+08:00Application process closed with code: 8 signal: null
hnjp
2016-06-08 16:24:11+08:00The container has crashed. A new container will be started to replace it.

6.MongoError: Authentication failed.
As the log file indicates…but I do create a user name “user” with a password “123”, and I specify this info in the settings.json file.

7.AnyOne could help??? Thanks.


#2

As the error says, mongodb can not authenticate. Looks like you forgot to provide the mongodb password in your settings. Check the galaxy documentation

{
  "galaxy.meteor.com": { 
     "env": { 
       "MONGO_URL": "mongodb://<dbuser>:<dbpassword>@<dbserver>:<dbport>/<dbname>" 
     } 
   }
}

#3

Hello jamgold,

Good point, thanks. When I do the copy-paste job I forgot the <dbuser>, it still can not reach my url. I follow the galaxy document step by step. I just cannot understand, my app already successful deployed, but cannot reach using the url???

{
galaxy.meteor.com”: {
“env”: {
“MONGO_URL”: “mongodb://<carol>:<123>@ds025603.mlab.com:25603/appdb”
}
}
}


#4

404 Not Found: No applications registered for host ‘zqy-dzf.meteorapp.com’.