本文介绍了如何解决AWS Elastic Beanstalk中的“容器命令构建失败"通用错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

我正在关注

您必须明确要求EB 使用右侧菜单获取文件.默认情况下,如果您不询问,日志面板将为空.

Problem

I'm following this AWS documentation to enable HTTPS in my Flask Elastic Beanstalk environment. When I follow the steps outlined, I get the following error:

2020/08/24 21:30:04.183362 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s
       arn:aws:cloudformation:us-east-1:XXXXXXXXX:stack/awseb-e-XXXXXXXXX-stack/
       XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX-r AWSEBAutoScalingGroup --region us-east-1
       --configsets Infra-EmbeddedPostBuild
2020/08/24 21:30:04.592591 [ERROR] An error occurred during execution of command
       [app-deploy] - [PostBuildEbExtension]. Stop running the command. Error: Container
       commands build failed. Please refer to /var/log/cfn-init.log for more details.

I do not have ssh access to the EC2 instances that I deployed. I'm wondering about troubleshooting this particular issue, and generally how to deal with this situation in Elastic Beanstalk.

Question

  1. What issue might be causing the Error: Container commands build failed above?
  2. What can I do to troubleshoot an issue like this ifI don't have ssh access to my EC2 instance? Is there a way to viewthese cfn-init.log files?

Context

The app works perfectly if I exclude this 02_https_instance.config file from my source code. I am wondering if the AWS example needs to be updated for Linux 2, as the mod24_ssl they suggest is for Linux 1, whereas I have to use mod_ssl in this version (Reference). Are there other code updates that are required to make this work?

解决方案

Container commands is a section in your .ebextentions. Thus it seems a commend defined in container_commands section failed.

You can download all log files form EB console:

You have to explicitly ask EB to get the files using the menu on the right. By default, the logs panel will be empty if you don't ask.

这篇关于如何解决AWS Elastic Beanstalk中的“容器命令构建失败"通用错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 09:58