Reputation: 420
I created a load balancer and assigned it one of the running EC2 instance. After creation, I navigated to Target Group section in the AWS Console under Load Balancing and when I selected the target group that was assigned to the load balancer, it shows registered instance status as "Unhealthy" and there was a message above registered instance pane that says "None of these Availability Zones contains a healthy target. Requests are being routed to all targets". While creating the load balancer, I selected all the subnets (availability zones). settings I used for health check are mentioned below,
So why does my registered instance status as "Unhealthy" and how can I rectify/resolve that to change the status to "In-service"?
Upvotes: 17
Views: 80164
Reputation: 41
Make sure outbound rules ports are opened for (Elastic Load Balancer) ELB security group.
Upvotes: 4
Reputation: 1
Search firewall on the search box to the left of your PC, select inbound, create new rules to allow the port you use for the load balancer
Upvotes: 0
Reputation: 897
In my case health check configuration on ALB is / with https.
I resolved with below steps.
Login to server and check does IIS server's default site has 443 port opened if your health-check is on 443. (whatever port you are using for health checks).
Use the curl command to troubleshoot the issue.
If you would like to check on HTTPS use the below command to check the response. Use -k or --insecure to ignore the SSL issue.
curl https://[serverIP] -k
For HTTP test use the below command.
curl http://[serverIP]
Upvotes: 2
Reputation: 253
If you are sharing the load balancer among several EC2 instances that run similar services, make sure each of your services run in a different port otherwise your service won't be reachable and therefore your health check won't pass
Upvotes: 0
Reputation: 269111
Unhealthy indicates that the health check is failing for the instance.
Things to check:
healthcheck.html
responds with a valid 200 responseUpvotes: 23