Reputation: 134
I've recently created this ASG and had it setup and working, but I needed to make some modifications to the AMI that was being used. I detached the one instance that was currently part of the ASG, and since then these issues have started happening.
I've tried reattaching the instance to the ASG, which works, but new instances still fail to launch.
The activity console isn't telling me why there was a launch failure, and it continues to do this forever until I set the desired instances in the ASG to 0.
Here's the activity log:
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
How would I go about troubleshooting this?
It doesn't seem to related to the AMI itself, as I can launch an instance that's not part of the ASG and it runs without any issues.
Upvotes: 3
Views: 4999
Reputation: 269091
It would appear that the Auto Scaling group has been configured to use Amazon EC2 Auto Scaling lifecycle hooks - Amazon EC2 Auto Scaling.
This is where a new instance is launched and a notification is sent to a Lifecycle Hook. Auto Scaling will wait until the Lifecycle Hook has been processed before putting the instance into service.
Your error message seems to indicate this there was no such response, so the instance was terminated. You should check your Auto Scaling group configuration for Lifecycle Hooks.
Upvotes: 3