2个不同服务器上的Meteor-Up故障

时间:2015-01-27 20:50:23

标签: meteor meteor-up

每次尝试部署到AWS / EC2实例或Digital Ocean Droplet时,我都会遇到故障。使用EC2实例我正在使用pem文件和Droplet我正在使用密码访问。有很多环节可以通过mup设置跳过,但最终在两个实例上都成功了。它是调用部署过程失败的mup部署:步骤。

这是我的mup.json的Droplet:

{
  // Server authentication info
  "servers": [
    {
      "host": "xx.xx.xx.xx",
      "username": "root",
      "password": "notmypassword"
      // or pem file (ssh based authentication)
      //"pem": "~/.ssh/id_rsa"
      //"pem": "/users/alex/dropbox/awspems/projectmanager.pem"
    }
  ],

  // 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.33 by default. Do not use v, only version number.
  "nodeVersion": "0.10.35",

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

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

  // Location of app (local directory)
  "app": "/users/alex/dropbox/projectmanager",

  // Configure environment
  "env": {
    "ROOT_URL": "http://xx.xx.xx.xx"
  },

  // 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": 30
}

无论是在EC2实例还是Droplet实例中,都会显示以下消息:

Claire-MacAir-7:projectmanager alex$ mup deploy

Meteor Up: Production Quality Meteor Deployments
------------------------------------------------

“ Checkout Kadira!
  It's the best way to monitor performance of your app.
  Visit: https://kadira.io/mup ”

Building Started: /users/notmyusername/dropbox/projectmanager

Started TaskList: Deploy app 'projectmanager' (linux)
[xx.xx.xx.xx] - Uploading bundle
[xx.xx.xx.xx] ✔ Uploading bundle: SUCCESS
[xx.xx.xx.xx] - Setting up Environment Variables
[xx.xx.xx.xx] ✔ Setting up Environment Variables: SUCCESS
[xx.xx.xx.xx] - Invoking deployment process
[xx.xx.xx.xx] ✘ Invoking deployment process: FAILED

    -----------------------------------STDERR-----------------------------------
    ir=/root/.node-gyp/0.10.35',
    gyp info spawn args   '-Dmodule_root_dir=/opt/projectmanager/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt',
    gyp info spawn args   '--depth=.',
    gyp info spawn args   '--no-parallel',
    gyp info spawn args   '--generator-output',
    gyp info spawn args   'build',
    gyp info spawn args   '-Goutput_dir=.' ]
    gyp info spawn make
    gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    gyp info ok
    npm WARN package.json meteor-dev-bundle@0.0.0 No description
    npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
    npm WARN package.json meteor-dev-bundle@0.0.0 No README data
    stop: Unknown instance:
      % 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
    App did not pick up! Please check app logs.
    -----------------------------------STDOUT-----------------------------------
    LE(target) Release/obj.target/bcrypt_lib.node: Finished
      COPY Release/bcrypt_lib.node
    make: Leaving directory `/opt/projectmanager/tmp/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/build'

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

    `linux-x64-v8-3.14` exists; testing
    Binary is fine; exiting
    underscore@1.5.2 node_modules/underscore

    semver@4.1.0 node_modules/semver

    chalk@0.5.1 node_modules/chalk
    ├── escape-string-regexp@1.0.2
    ├── ansi-styles@1.1.0
    ├── supports-color@0.2.0
    ├── strip-ansi@0.3.0 (ansi-regex@0.2.1)
    └── has-ansi@0.1.0 (ansi-regex@0.2.1)

    eachline@2.3.3 node_modules/eachline
    └── type-of@2.0.1

    source-map-support@0.2.8 node_modules/source-map-support
    └── source-map@0.1.32 (amdefine@0.1.0)

    fibers@1.0.1 node_modules/fibers
    Waiting for MongoDB to initialize. (5 minutes)
    connected
    projectmanager start/running, process 11786
    Waiting for 30 seconds while app is booting up
    Checking is app booted or not?
    ----------------------------------------------------------------------------
Completed TaskList: Deploy app 'projectmanager' (linux)

该项目完美运行,我的本地主机没有错误。

有什么想法吗?

提前致谢Alex Adams


解决方案是:

mup日志显示它不喜欢为文件夹指定的路径来保存上传的文件。我将应用程序更改为使用GridFS,从而将文件存储在数据库中。该应用程序现在正确部署。

0 个答案:

没有答案