运行部署后,流星终止 [英] Meteor-up terminates after running deploy

查看:103
本文介绍了运行部署后,流星终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道为什么会收到此错误.流星雨是一个辉煌.每当我运行deploy命令时,它就会停顿一段时间并终止.可能是服务器已设置超时以完成文件上传吗?

I don't know why I'm getting this error. Meteor-up is a brilliant. Whenever I run the deploy command it gets to a time and terminates. Could it be that a timeout has been set for the server to finish uploading the files?

C:\Programs\contract\schoolapps\.deploy>mup.cmd deploy --cached-build

   ┌─────────────────────────────────────┐
   │                                     │
   │   update available 1.3.2 => 1.3.3   │
   │     To update, run npm i -g mup     │
   │                                     │
   └─────────────────────────────────────┘

Not building app. Using build from previous deploy at
C:\Users\Kehinde\AppData\Local\Temp\mup-meteor-58e876b4-e682-4ecf-9d41-168fa46a5b19

Started TaskList: Pushing Meteor App
[xxx.xxx.xx.xx] - Pushing Meteor App Bundle to The Server
[===============                        ] 41% 630.4sevents.js:160
      throw er; // Unhandled 'error' event
      ^

Error: write ECONNRESET
    at exports._errnoException (util.js:1020:11)
    at WriteWrap.afterWrite (net.js:800:14)

C:\Programs\contract\schoolapps\.deploy>

上传成功后,出现此错误:

After the upload was successful I got this error:

[xxx.xxx.xx.xx] x Prepare Bundle: FAILED

        -----------------------------------STDERR-----------------------------------
        Error response from daemon: No such container: myappsupload
        The command '/bin/sh -c cd  /built_app/programs/server &&     npm install --unsafe-perm' returned a non-zero code: 1
        Error response from daemon: No such container: myappsupload
        Error: failed to start containers: myappsupload
        -----------------------------------STDOUT-----------------------------------
        mnpm ERR! meteor-dev-bundle@0.0.0 install: `node npm-rebuild.js`
        npm ERR! Exit status 254
        npm ERR!
        npm ERR! Failed at the meteor-dev-bundle@0.0.0 install script 'node npm-rebuild.js'.
        npm ERR! Make sure you have the latest version of node.js and npm installed.
        npm ERR! If you do, this is most likely a problem with the meteor-dev-bundle package,
        npm ERR! not with npm itself.
        npm ERR! Tell the author that this fails on your system:
        npm ERR!     node npm-rebuild.js
        npm ERR! You can get information on how to open an issue for this project with:
        npm ERR!     npm bugs meteor-dev-bundle
        npm ERR! Or if that isn't available, you can get their info via:
        npm ERR!     npm owner ls meteor-dev-bundle
        npm ERR! There is likely additional logging output above.

        npm ERR! Please include the following file with any support request:
        npm ERR!     /built_app/programs/server/npm-debug.log

        ----------------------------------------------------------------------------

C:\Programs\contract\myappsupload\.deploy>

这是mup.js文件:

This is the mup.js file:

module.exports = {
  servers: {
    one: {
      // TODO: set host address, username, and authentication method
      host: 'xxx.xxx.xx.xx',
      username: 'root',
      // pem: './path/to/pem'
       password: 'xxxxxxxxxxxxxxxx'
      // or neither for authenticate from ssh-agent
    }
  },

  app: {
    // TODO: change app name and path
    name: 'schoolapps',
    path: '../',

    servers: {
      one: {},
    },

    buildOptions: {
      serverOnly: true,
    },

    env: {
      // TODO: Change to your app's url
      // If you are using ssl, it needs to start with https://
      ROOT_URL: 'http://schoolapps.com',
      MONGO_URL: 'mongodb://localhost/meteor',
    },

    // ssl: { // (optional)
    //   // Enables let's encrypt (optional)
    //   autogenerate: {
    //     email: 'email.address@domain.com',
    //     // comma separated list of domains
    //     domains: 'website.com,www.website.com'
    //   }
    // },

    docker: {
      // change to 'kadirahq/meteord' if your app is using Meteor 1.3 or older
      image: 'abernix/meteord:base',

      args: [
        //'--link=myCustomMongoDB:myCustomMongoDB', // linking example
        '--memory-reservation 300M' // memory reservation example
      ],
    },

    // Show progress bar while uploading bundle to server
    // You might need to disable it on CI servers
    enableUploadProgressBar: true,
    deployCheckWaitTime: 150
  },

  mongo: {
    version: '3.4.1',
    servers: {
      one: {}
    }
  }
};

推荐答案

我不知道它是否仍然有用,但是也许我的回答会帮助其他人解决相同的问题.

I do not know if it is still relevant, but maybe my answer will help someone else dealing with the same problem.

准备包"任务在Meteor Up的1.3.0版本中引入(请参见发行说明):

The task "Prepare bundle" was introduced in the version 1.3.0 of Meteor Up (see release notes):

将捆绑包上传到每个服务器后,将运行一个名为准备捆绑包"的新任务.它安装Meteor npm依赖项,重建本机模块,并将结果存储在docker映像中.这有一些好处:

After the bundle is uploaded to each server, a new task is run called "Prepare bundle". It installs the Meteor npm dependencies, rebuilds native modules, and stores the result in a docker image. This has a few benefits:

  • 在meteor.deployCheckWaitTime中的时间不再需要包括安装npm依赖项的时间
  • 当安装依赖项失败时,它不会持续重新启动,直到meteor.deployCheckWaitTime到期,并以--verbose运行会显示npm install的完整日志
  • 依赖项在每次部署期间仅安装一次.这意味着mup启动,mup重新启动和mup重新配置都快得多.
  • The time in meteor.deployCheckWaitTime no longer needs to include the time to install npm dependencies
  • When installing dependencies fails, it does not continuously restart until meteor.deployCheckWaitTime expires, and running with --verbose shows the full logs from npm install
  • Dependencies are only installed once during each deploy. This means that mup start, mup restart, and mup reconfig are all much faster.

从1.3.1版开始,可以通过在mup.js中添加选项app.docker.prepareBundle并将其设置为false来禁用此任务.几周前,我处理了相同的错误,并且通过这种解决方法,我能够将应用程序部署到DigitalOcean.

From the version 1.3.1 this task can be disabled by adding the option app.docker.prepareBundle in mup.js and setting it to false. I dealt with the same error a few weeks ago and with this workaround I was able to deploy my application to DigitalOcean.

这篇关于运行部署后,流星终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆