为什么Elastic Beanstalk 的自动伸缩组无法创建 EC2 实例?

0

【以下的问题经过翻译处理】 问题

使用 Elastic Beanstalk 与 GitHub Actions 部署应用程序,当Github Actions被触发时,Beanstalk 会创建一个 ASG,其中所需的容量会创建至少 1 个容器化应用程序实例。 由于某种原因,Beanstalk 提供的 ASG 几乎立即将实例设置为不健康并终止它们。这个过程重复 5 或 6 次,然后将错误状态返回给 beanstalk 应用程序。 ASG 仍处于配置状态,当我查看 ASG 活动历史记录日志时,我得到以下信息:

状态说明原因
CancelledLaunching a new EC2 instance. Status Reason: Instance Became unhealthy while waiting for instance to be in inService state. Termination Reason: Client.InternalError: Client error on launchAt 2022-01-13 an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1

EB 环境事件抛出 4 个错误:

Creating Auto Scaling group named: awseb-[...]-AWSEBAutoScalingGroup-1V0R8Z9EJ8G8J failed. Reason: Group did not stabilize. {current/minSize/maxSize} group size = {0/1/1}.
Service:AmazonCloudFormation, Message:Stack named 'awseb-e-rvjtnttttf-immutable-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBAutoScalingGroup].
Failed to deploy application.
Cannot complete command execution on the following instances as they are no longer running: [i-03449eff8756123c2].

目前已采取以下步骤

  1. 检查IAM 角色权限以允许创建 EC2 实例
  2. 检查SG、负载均衡器与目标组之间的网络连接

个人观点

问题似乎不直接出在 Beanstalk 上,而是出在目标组和实例之间,也许需要 VPC Endpoint 才能让目标组健康检查通过?

1 Antwort
0

【以下的回答经过翻译处理】 查看了此处 描述的问题,发现主要问题实际上是 EBS 卷,默认情况下启用了 EBS 加密,但我当前的 EB 应用程序版本无法支持加密的 EBS。

这就是“client error on launch”的来源。

profile picture
EXPERTE
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen