amazon-web-services - AWS Auto Scaling 启动失败,导致新实例无法启动

标签 amazon-web-services amazon-ec2

我最近创建了这个 ASG,并对其进行了设置和运行,但我需要对正在使用的 AMI 进行一些修改。我分离了当前属于 ASG 的一个实例,从那时起这些问题就开始发生。

我尝试将实例重新连接到 ASG,这有效,但新实例仍然无法启动。

事件控制台没有告诉我为什么启动失败,并且它会永远继续执行此操作,直到我将 ASG 中的所需实例设置为 0。

这是事件日志:

Successful  Terminating EC2 instance: i-072a7a11dadcba031   At 2022-03-11T13:29:01Z an instance was taken out of service in response to a launch failure.   2022 March 11, 08:29:01 AM -05:00   2022 March 11, 08:30:25 AM -05:00

Cancelled   Launching a new EC2 instance: i-072a7a11dadcba031. Status Reason: Instance failed to complete user's Lifecycle Action: Lifecycle Action with token c8eb31cb-4648-4390-93a6-e049033f3ba4 was abandoned: Lifecycle Action Completed with ABANDON Result   At 2022-03-11T13:27:37Z a user request update of AutoScalingGroup constraints to min: 1, max: 4, desired: 1 changing the desired capacity from 0 to 1. At 2022-03-11T13:27:46Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1.    2022 March 11, 08:27:48 AM -05:00   2022 March 11, 08:29:01 AM -05:00

Successful  Terminating EC2 instance: i-0ca1b9a7e42966793   At 2022-03-11T13:21:54Z an instance was taken out of service in response to a launch failure.   2022 March 11, 08:21:54 AM -05:00   2022 March 11, 08:23:16 AM -05:00

Cancelled   Launching a new EC2 instance: i-0ca1b9a7e42966793. Status Reason: Instance failed to complete user's Lifecycle Action: Lifecycle Action with token 088d4fc9-7e01-41e2-bb9d-df4485d488ea was abandoned: Lifecycle Action Completed with ABANDON Result   At 2022-03-11T13:20:53Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1.   2022 March 11, 08:20:55 AM -05:00   2022 March 11, 08:21:54 AM -05:00

Successful  Terminating EC2 instance: i-06695e836f4cdbd5b   At 2022-03-11T12:53:53Z an instance was taken out of service in response to a launch failure.   2022 March 11, 07:53:53 AM -05:00   2022 March 11, 07:55:17 AM -05:00

Cancelled   Launching a new EC2 instance: i-06695e836f4cdbd5b. Status Reason: Instance failed to complete user's Lifecycle Action: Lifecycle Action with token b985e810-9dbc-4f37-a70e-d6eb90a85f51 was abandoned: Lifecycle Action Completed with ABANDON Result   At 2022-03-11T12:52:39Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1.   2022 March 11, 07:52:41 AM -05:00   2022 March 11, 07:53:53 AM -05:00

我该如何解决这个问题?

它似乎与 AMI 本身无关,因为我可以启动一个不属于 ASG 的实例,并且它运行时没有任何问题。

最佳答案

Auto Scaling 组似乎已配置为使用 Amazon EC2 Auto Scaling lifecycle hooks - Amazon EC2 Auto Scaling .

这是启动新实例并将通知发送到生命周期 Hook 的地方。 Auto Scaling 将等到 Lifecycle Hook 处理完毕后再将实例投入使用。

您的错误消息似乎表明没有此类响应,因此实例已终止。您应该检查 Auto Scaling 组的 Lifecycle Hooks 配置。

关于amazon-web-services - AWS Auto Scaling 启动失败,导致新实例无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71439791/

相关文章:

amazon-web-services - AWS CloudFormation‎ 模板 : Subnet addresses validation

tomcat端口关闭

php - 映射 CIFS 共享上的 chown 不起作用

amazon-web-services - 如何从 EC2 实例配置文件管理 EKS?

amazon-web-services - 无法将 AWS 主机注册到 Ambari 服务器

java - 亚马逊 AWS,使用 maven 将 war 部署到 tomcat 8

ssl - HTTPS 不工作(在基于 AWS Elastic Beanstalk 的站点上)

node.js - S3 存储桶 Lambda 事件 : Unable to validate the following destination configurations

amazon-web-services - 将命令作为变量传递给 ECS 任务定义

javascript - 如何使用适用于 Javascript 的 AWS-SDK 搜索我的 CloudSearch 域?