首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Meteor-up在运行deploy后终止

Meteor-up在运行deploy后终止
EN

Stack Overflow用户
提问于 2017-09-13 21:14:42
回答 2查看 286关注 0票数 0

我不知道为什么我会得到这个错误。流星雨是一种很棒的游戏。每当我运行deploy命令时,它都会到达某个时间并终止。会不会是服务器设置了超时时间来完成文件上传?

代码语言:javascript
复制
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>

上传成功后,我得到了这个错误:

代码语言:javascript
复制
[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文件:

代码语言:javascript
复制
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: {}
    }
  }
};
EN

回答 2

Stack Overflow用户

发布于 2017-09-13 22:25:57

在提出问题之前,没有什么可以替代阅读文档。

您还应该按照它的建议更新mup包。

有一个可能适用的设置deployCheckWaitTime,但它看起来上传失败。我不确定它是否包括上传时间,但值得增加它来检查。

10分钟的上传速度只有41%,这是一个很长的时间,所以你的上传连接很慢-你能通过手机连接更快的速度吗?

如果这不起作用,请查看目标服务器上的磁盘是否已满,或者是否有其他超时(如计算机进入睡眠)。

票数 0
EN

Stack Overflow用户

发布于 2017-11-13 18:01:47

我不知道它是否仍然相关,但也许我的答案会对其他处理相同问题的人有所帮助。

任务"Prepare bundle“是在Meteor Up的1.3.0版本中引入的(参见release notes):

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

verbose

  • meteor.deployCheckWaitTime中的时间不再需要包括安装npm verbose的时间安装依赖项失败,它不会连续重新启动,直到meteor.deployCheckWaitTime过期,运行--

  • 显示npm install

  • Dependencies的完整日志在每次部署期间只安装一次。这意味着多路复用启动、多路复用重新启动和多路复用重新配置都要快得多。

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46198606

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档