user1289797
user1289797

Reputation: 11

Why is my auto scaling EC2 instance reported as 'out of service' by the load balancer?

I'm having an issue with an Amazon EC2 instance during auto scaling. Every command I typed worked. I found no errors. But when testing whether auto scaling is working or not I found that it works until the instance started. The newly spawned instance does not work afterwards though: It's under my load balancer but its status is out of service. One more issue is when I copy and paste the public DNS link into the browser it does not respond and an error is triggered like "firefox can't find ..."

I doubt that there should be problem with the image or the Linux configuration.

Thanks in advance.

Upvotes: 0

Views: 1164

Answers (3)

vijay
vijay

Reputation: 1

Rules on security groups assigned to the instance and the load balancer were not allowing traffic to pass between the two. This caused the health check to fail.So , u r load balancer is out of service. If you don't have index.html in document root of instance - default health check will fail. You can set custom protocol, port and path for health check when creating load balancer saying as per my experience

Upvotes: 0

Brij Raj Singh - MSFT
Brij Raj Singh - MSFT

Reputation: 5113

Although its been long since you posted it, but try adjusting the health check of the Load balancer, if your health check is like this

Ping Target: HTTP:80/index.php Timeout: 10 seconds Interval: 30 seconds Unhealthy Threshold: 4 Healthy Threshold: 2

that means an instance will be marked out of service if the ping target doesn't respond within 10 seconds for 4 consecutive instances, while ELB will try to reach it every 30 seconds.

Upvotes: 1

Paul Ma
Paul Ma

Reputation: 615

usually the fact that you get "firefox can't find ..." when you try to access the instance directly means that the service is down. Try to login on the instance check if the service is alive, also check the firewall rules which might block internet/elb requests. Check also your ELB health-check it's a good place to start. If you still have issues try to post some debug information like instance netstat, elb describe, parameters.

Upvotes: 0

Related Questions