我正在使用Meteor Blaze,现在想通过Meteor Galaxy部署我的应用程序。一切都在本地主机上工作。
现在,我试着从一台Windows计算机上将我的应用程序部署到Galaxy。
不幸的是,我总是收到以下错误日志,并且容器正在崩溃:
2017-08-14 11:50:38+02:00/app/bundle/programs/server/node_modules/fibers/future.js:313
2017-08-14 11:50:38+02:00 throw(ex);
2017-08-14 11:50:38+02:00 ^
2017-08-14 11:50:39+02:00MongoError: not authorized on admin to execute command { listIndexes: âusersâ, cursor: { } }
2017-08-14 11:50:39+02:00 at Object.Future.wait (/app/bundle/programs/server/node_modules/fibers/future.js:449:15)
2017-08-14 11:50:39+02:00 at [object Object].MongoConnection._ensureIndex (packages/mongo/mongo_driver.js:832:10)
2017-08-14 11:50:39+02:00 at [object Object].Mongo.Collection._ensureIndex (packages/mongo/collection.js:686:20)
2017-08-14 11:50:39+02:00 at setupUsersCollection (packages/accounts-base/accounts_server.js:1490:9)
2017-08-14 11:50:39+02:00 at new AccountsServer (packages/accounts-base/accounts_server.js:51:5)
2017-08-14 11:50:39+02:00 at meteorInstall.node_modules.meteor.accounts-base.server_main.js (packages/accounts-base/server_main.js:9:12)
2017-08-14 11:50:39+02:00 at fileEvaluate (packages/modules-runtime.js:333:9)
2017-08-14 11:50:39+02:00 at require (packages/modules-runtime.js:228:16)
2017-08-14 11:50:39+02:00 at /app/bundle/programs/server/packages/accounts-base.js:2038:15
2017-08-14 11:50:39+02:00 at /app/bundle/programs/server/packages/accounts-base.js:2049:3
2017-08-14 11:50:39+02:00 - - - - -
2017-08-14 11:50:39+02:00 at Function.MongoError.create (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11)
2017-08-14 11:50:39+02:00 at queryCallback (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/cursor.js:212:36)
2017-08-14 11:50:39+02:00 at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18
2017-08-14 11:50:39+02:00 at nextTickCallbackWith0Args (node.js:489:9)
2017-08-14 11:50:39+02:00 at process._tickCallback (node.js:418:13)
2017-08-14 11:50:39+02:00 Application exited with code: 1
2017-08-14 11:50:44+02:00 The container has crashed. A new container will be started to replace it.
这可能与我启动应用程序或部署应用程序时创建的dev_bundle文件夹有关吗?或者我必须在
settings.json
我使用的是MongoDB Atlas,连接字符串的结构与MongoDB Atlas提供的相同。这个
设置。json
{
"galaxy.meteor.com": {
"env": {
"ROOT_URL": "http://myapp.eu.meteorapp.com",
"MONGO_URL": "mongodb://<myUsername>:<password>@<clusterName>-shard-00-00-<xxxxx>.mongodb.net:27017,<clusterName>-shard-00-01-<xxxxx>.mongodb.net:27017,<clusterName>-shard-00-02-<xxxxx>.mongodb.net:27017/admin?ssl=true&replicaSet=<clusterName>-shard-0&authSource=admin",
"MONGO_OPLOG_URL": "mongodb://<myUsernameForOplog>:<password>@<clusterName>-shard-00-00-<xxxxx>.mongodb.net:27017,<clusterName>-shard-00-01-<xxxxx>.mongodb.net:27017,<clusterName>-shard-00-02-<xxxxx>.mongodb.net:27017/local?ssl=true&replicaSet=<clusterName>-shard-0&authSource=admin"
}
}
}