我正在使用流星火焰,現在想通過流星銀河部署我的應用程序。一切適用於本地主機。流星銀河部署失敗 - 集裝箱崩潰
現在,我嘗試從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提供的相同。該settings.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"
}
}
}
是的,謝謝。這可能是問題,但我不知道'MONGO_URL'中的失敗位置。我編輯了我的文章,並添加了所有連接字符串的settings.json文件。 – Jaybruh
更新了我的答案。 – Styx
令人驚歎!非常感謝你,花了一整天的時間。你是對的,我通過mongoDBAtlas創建了另一個擁有自己的數據庫的用戶,現在它可以工作。 – Jaybruh