【问题标题】:Meteor Up Deployment to Amazon EC (Ubuntu 14.04) not workingMeteor Up 部署到 Amazon EC (Ubuntu 14.04) 不起作用
【发布时间】:2014-05-24 02:24:33
【问题描述】:

我使用 Ubuntu 14.04 设置了一个标准的 Amazon Micro 实例,设置了一个 sudo 用户,并且基本上按照 Meteor Up 的说明进行操作。我在“调用部署过程”阶段收到此错误...

 -----------------------------------STDERR-----------------------------------
        Warning: Permanently added 'ec2-54-200-136-28.us-west-2.compute.amazonaws.com,54.200.136.28' (ECDSA) to the list of known hosts.
        npm http GET https://registry.npmjs.org/fibers
        npm http 304 https://registry.npmjs.org/fibers
          % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                         Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to localhost port 80: Connection refused
        Latest deployment failed! Reverted back to the previous version.
        -----------------------------------STDOUT-----------------------------------

        > fibers@1.0.1 install /opt/meteor/tmp/bundle/programs/server/node_modules/fibers
        > node ./build.js

我做错了吗?我在 Amazon EC2 设置中打开了端口 80,我的 mup.json 文件如下所示:

{
  // Server authentication info
  "servers": [
    {
      "host": "[amazon_IP]",
      "username": "ubuntu",
      "password": "password"
      // or pem file (ssh based authentication)
      //"pem": "~/.ssh/id_rsa"
    }
  ],

  // Install MongoDB in the server, does not destroy local MongoDB on future setup
  "setupMongo": true,

  // WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
  "setupNode": true,

  // WARNING: If nodeVersion omitted will setup 0.10.25 by default. Do not use v, only version number.
  "nodeVersion": "0.10.25",

  // Install PhantomJS in the server
  "setupPhantom": true,

  // Application name (No spaces)
  "appName": "meteor",

  // Location of app (local directory)
  "app": "/home/meteor_apps/thestory",

  // Configure environment
  "env": {
    "PORT": 80,
    "ROOT_URL": "http://54.200.136.28"
  },

  // Meteor Up checks if the app comes online just after the deployment
  // before mup checks that, it will wait for no. of seconds configured below
  "deployCheckWaitTime": 15
}

我只是将我的 ROOT_URL 设置为 Amazon 公共 IP...不太确定 Meteor 在哪里使用 ROOT_URL 环境变量

【问题讨论】:

    标签: amazon-ec2 meteor meteor-up


    【解决方案1】:

    对于微型实例,Meteor 需要更长的时间才能完成捆绑您的应用程序。将deployCheckWaitTime 增加到类似于300(5 分钟)。

    发生了什么是 Meteor 放弃等待它完成,所以你需要增加这个超时时间。

    您可能还需要检查节点版本,根据您的 Meteor 版本,您可能需要使用更高版本,例如 0.10.28 用于 0.8.1.2/3。您可以尝试安装它,但如果遇到问题,您需要再次运行 mup setup 或手动安装节点。

    【讨论】:

    • hmm.. 好的,我会再试一次,我的 settings.json 文件中需要什么吗?我没有碰它,甚至不知道它为什么在那里。 appName 是什么也有关系吗?我很难理解为 ROOT_URL 放置的内容..
    • @JasonIp 再试一次,如果有什么问题它会在部署时抱怨,如果你没有域,ROOT_URL 看起来很好
    • 有效!谢谢你,先生!好吧,计划最终是要有一个域。我打算做的是在我的亚马逊微实例上指向一个域,如果我这样做,我需要设置 ROOT_URL 吗?如果没有,Meteor 何时以及如何使用 ROOT_URL?
    • Meteor 使用它来正确路由请求,例如,如果您使用像 facebook 登录这样的 oauth,facebook 需要知道您登录后重定向到的位置。获得域后,您可以对其进行更改并重新部署。
    猜你喜欢
    • 2016-02-02
    • 2014-07-10
    • 2022-11-12
    • 1970-01-01
    • 2017-03-01
    • 1970-01-01
    • 2015-11-01
    • 2015-11-10
    • 1970-01-01
    相关资源
    最近更新 更多