简体   繁体   English

流星Galaxy部署失败-容器崩溃

[英]Meteor Galaxy Deployment fails - Containers crashing

I am using Meteor Blaze and now wanted to deploy my app via Meteor Galaxy. 我正在使用Meteor Blaze,现在想通过Meteor Galaxy部署我的应用程序。 Everything works on local host. 一切都在本地主机上运行。

Now, I tried to deploy my app to Galaxy from a Windows computer. 现在,我尝试从Windows计算机将应用程序部署到Galaxy。

Unfortunately, I always receive the following error logs and the containers are crashing: 不幸的是,我总是收到以下错误日志,并且容器崩溃了:

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.

Could it have something to do with the “dev_bundle” folder which is created as soon as I start the app or deploy the app? 它与我启动应用程序或部署应用程序后立即创建的“ dev_bundle”文件夹有关吗? Or do I have to search the error within the environmental variables in the settings.json file? 还是我必须在settings.json文件的环境变量中搜索错误?

I am using MongoDB Atlas and the structure of the connection string is the same as provided from mongoDB Atlas. 我正在使用MongoDB Atlas,连接字符串的结构与mongoDB Atlas提供的相同。 The settings.json file looks like this: 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"
    }
  }

}  

Your error is: 您的错误是:

MongoError: not authorized on admin to execute command { listIndexes: “users”, cursor: { } } MongoError:未经管理员授权执行命令{listIndexes:“用户”,光标:{}}

Seems like your MONGO_URL is wrong, could you share it (excluding crucial information: credentials etc)? 似乎您的MONGO_URL错误,可以共享吗(不包括关键信息:凭据等)?

Added: 添加:

You're trying to read/write to the admin DB, but you should create your own, for example, meteor . 您试图读取/写入admin数据库,但是您应该创建自己的数据库,例如meteor

Here is how your MONGO_URL should look like: MONGO_URL外观如下:

mongodb://.../meteor?ssl=true&replicaSet=...&authSource=admin

Your MONGO_OPLOG_URL is good, you need not change it. 您的MONGO_OPLOG_URL很好,您不需要更改它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM