[Music]
hello I'm Manju a cloud Support Engineer
here at the AWS office in Dublin in this
video we will troubleshoot why an Amazon
ec2 auto scaling group is not
terminating an unhealthy instance as you
can see I'm already logged into my AWS
management console to go to auto-scaling
console navigate to ec2 by typing ec2
under AWS services
scroll down to our scaling groups under
auto-scaling
first of all choose the instances tab
check the health status of your instance
under health status if the instance
still shows healthy or has been
unhealthy for a few minutes give out a
screening Group couple of minutes to
initiate a health check replacement if
the instance shows healthy after waiting
for a couple of minutes then proceed to
next troubleshooting steps check if the
health check type is correctly set under
details tab in the console for this
navigate to details in this example my
auto scaling group is set to ec2 however
my instance is failing ELB health checks
auto scaling group will not replace an
instance as health check is set to easy
- second check if health check process
is suspended under suspended processes
on the right hand side look for
suspended processes check if palchik
process has been suspended here if so
click on edit
and remove health check processes from
the suspended process save it
not that auto-scaling will not check the
health of your ec2 instance if the
health check process is suspended and
note that this could be the reason why
your ec2 instance is still showing
healthy if your ec2 instance is failing
ELB health checks but it is still
showing healthy in our scaling group
check if your health check type is
correctly set under details tab in the
console in this example my auto scaling
group is set to ec2 and my instance is
failing lb health checks auto scaling
will not replace an instance if a health
check type is set to ec2 you can also
check if the instance is in standby
state now I get two instances tab under
your auto scaling group
here as you can see one of my instance
is in standby state auto-scaling
does not perform health check on standby
instances this could be the reason why
your instance is still showing healthy
other than these troubleshooting steps
you can also check if the instance
status in the ec2 dashboard shows as
impaired auto-scaling
does not terminate impaired instances
immediately but wait for a couple of
minutes to see if the instance recovers
also check whether the instance or
system status shows as insufficient data
order scaling does not terminate
instances with insufficient data this is
to make sure we do not terminate a
healthy instances now let's look at
various reasons where auto scaling group
does not replace an instance which is
showing unhealthy as you can see one of
my instance is unhealthy here but auto
scaling is not terminating it let's see
why go to details Tam
and then under suspended processes check
if replace unhandy or terminate
processes are suspended as you can see
for this video we have already suspended
replace unhealthy and terminate in this
case auto-scaling will not terminate any
unhealthy instances click on edit on the
right hand corner and remove terminate
and replace unhealthy from suspended
processes click on save on the right
hand corner and after a few minutes you
will see auto-scaling will terminate the
unhealthy instances to verify go to
instances tab refresh your auto scaling
group on the right hand side to see if
auto scaling is terminating the instance
please note this could take a little
while
as you can see now after we have resumed
the processes auto-scaling
has initiated determination of ec2
instance
you can also check if there are any
lifecycle hooks configured on instance
termination navigate to lifecycle hooks
and check if you have any lifecycle
hooks configured in this test we have
configured a lifecycle hook named KC
test on instance termination now
navigate to instances tab and then check
the lifecycle of instances if the
instance state is terminating wait
auto-scaling is waiting for lifecycle
hook to complete before terminating the
instance if this is a newly launched
instance check if the instance age is
past the configured grace period of auto
scaling group navigate to details tab
here
check the health check grace period of
your auto scaling group if the health
check type is set to ELB you can check
the following go to a lb console by
navigating to load balancing and
clicking on load balancers
for this video you can see we have
already created a classic load balancer
named KC tests under the instances tamp
check if your instance is in out of
service if it is over your mouse over
the little eye icon and confirm that the
state is not instance registration is
still in progress or instance is in easy
to availability zone for which load
balancer is not configured to route
traffic to or instance has not passed
the configured healthy threshold number
of health checks consecutively you can
also see if you have connection draining
enabled on your ELB as you can see for
this test I already have my connection
training period set to 600 seconds to
demonstrate this we already have one
instance in out-of-service to verify
this you can navigate to auto scaling
and choose activity history tab to see
if auto scaling is waiting for a LV
connection draining period to finish
thanks for watching and happy cloud
computing from all of us here at aw
[Music]
you
[Music]