Jonathan S. Fisher
Jonathan S. Fisher

Reputation: 8817

Amazon EC2 autoscaling instances always show status as "pending"

I created a launch configuration using the Amazon ECS-oriented AMI. All of the instances are connected to a VPC but also have a public non-EIP address.

When I create an autoscaling group, I can look in the Instances page and see the instances pass all health checks.

Furthermore, the ELB I created picks the new instances up and begins to serve traffic to them.

However, the autoscaler always shows my instances as "pending" and eventually destroys them.

What is going on?

Instances: This is the Instances Page

ELB: ELB Page

Autoscaling show instances pending: Autoscaling show instances pending

Thanks for any help!

EDIT

Here's the output from the launch log, with a very unhelpful message:

Lauch log not helpful

Upvotes: 0

Views: 669

Answers (1)

Rodrigo Murillo
Rodrigo Murillo

Reputation: 13642

Check your ASG Activity History tab from the Auto Scaling Group module, checking in particular for the transition from Scale Out to Pending, to Terminated.

For each of those, check the 'more' arrow that will display the following fields:

  • Description: Launching a new EC2 instance: i-0aaaaa06b45ce05
  • Cause: At 2016-06-16T17:54:25Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 2 to 4

The activity history and the related lifecyle events description and cause will help you narrow down the problem quickly.

The cause for the Terminated/Cancelled event will be of particular interest. Here is an example of a Terminated event:

  • Description: Terminating EC2 instance: i-0aaaaaad47162b8f84
  • Cause: At 2016-05-20T08:12:42Z an instance was taken out of service in response to a EC2 instance status checks failure.

EDIT:

Based on the log history provided, the instance is failing to launch because of a Only EC2-Classic instances may be linked. error. There is configuration problem in the Launch Configuration.

Check your Launch Configuration, and make sure that Link to VPC option is unchecked in Advanced Details.

Upvotes: 1

Related Questions