Elastic Beanstalk在EbExtensionPostBuild处停止 [英] Elastic Beanstalk stops at EbExtensionPostBuild

查看:90
本文介绍了Elastic Beanstalk在EbExtensionPostBuild处停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用自定义.ebextensions文件部署EB实例时遇到问题.这是该文件中的相关部分:

I am having a problem deploying an EB instance with a custom .ebextensions file. This is the relevant part in that file:

container_commands:
  01_migrate:
    command: 'python db_migrate.py'
  02_npm_build:
    command: 'npm install && npm run prod'

如您所见,这些命令用于迁移我的PostgreSQL数据库(通过Flask后端)并构建我的React .jsx文件.

As you can see, these commands are for migrating my PostgreSQL database (via a Flask backend) and building my React .jsx files.

如果我不使用这些命令,则部署可以完美完成.但是,一旦我把它们放进去,看着eb-activity.log,它就永远停在这一部分(据我所知):

If I leave these commands out, the deployment completes perfectly well. However, once I put them in, looking at the eb-activity.log it stalls at this part forever (as far as I can tell):

[2017-04-10T02:39:24.106Z] INFO  [3023]  - [Application deployment app-613e-170409_223418@1/StartupStage0/EbExtensionPostBuild] : Starting activity...

我也在控制台的运行状况"概述中收到此消息(这是1天后):

I also get this message on the Health overview in the console (this is after 1 day):

Performing application deployment (running for 1 day).

我还尝试了在不使用那些container_commands的情况下进行部署,然后在成功进行初始部署之后将其包括在内.然后,我在eb-activity.log中收到与以前相同的错误消息,并且在运行状况"概述中也收到了此消息:

I have also tried to deploy it without those container_commands, and then including it back after the successful initial deployment. Then I get the same error message as before in eb-activity.log, and I also get this message on the Health overview:

Incorrect application version "app-2a3d-170409_214923" (deployment 1). Expected version "app-2a3d-170409_214923" (deployment 1).

这很奇怪,因为引用的这两个版本是相同的版本.我不知道这意味着什么!

Which is very strange because those two versions referenced are the same versions. I don't know what this means!

推荐答案

我找到了解决方案.

从.ebextensions/

Remove all you container_commands from .ebextensions/

使用ssh实例,杀死进程.

Go ssh to instance, kill process with.

sudo killall python

然后在不使用container_commands的情况下部署新版本. 并开始在ssh上逐一调试所有container_commands.

Then Deploy new version without container_commands. And start debuging all your container_commands, one by one on ssh..

玩得开心.

这篇关于Elastic Beanstalk在EbExtensionPostBuild处停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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