AWS Error : None of these Availability Zones contains a healthy target. Requests are being routed to all targets. in AWS

后端 未结 6 1618
梦毁少年i
梦毁少年i 2021-02-20 06:30

I have created a Application Load Balance in Aws. I have created 2 EC2 and make them a group. After that I add that group to the ALB with listener 80.

But when the syste

相关标签:
6条回答
  • 2021-02-20 07:08

    I encountered a similar issue while learning to setup load balancer for my EC2 instance.

    It turns out that under Target Groups:

    the "path" under the "Health Check" tab was not registered although it showed the correct value "/".

    Therefore I just edited the path value(by clicking the "edit health check") to "/" and saved it again just so that the system can register that value. (you could also try saving it to some other value, say "/health", first and then saving it back to "/")

    This seemed to fix my problem.

    0 讨论(0)
  • 2021-02-20 07:14

    Ensure that communication is allowed at security group level between your load balancer and your targets.

    From AWS https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-update-security-groups.html

    You must ensure that your load balancer can communicate with registered targets on both the listener port and the health check port [...] you must verify that the security groups associated with the load balancer allow traffic on the new port in both directions.

    For example, a simple way to portray the rules you would require if you have a PUBLIC FACING load balancer in security group sg-001 and three EC2 targets in another security group sg-002 is as follows:

    0 讨论(0)
  • 2021-02-20 07:16

    Hi all I just encountered the same issue and the solution is a setting in the ALB (Application Load Balancer) itself

    Make sure the ALB AZ matches your instance AZ here is a screenshot of the setting. I am using us-east-1a and us-eas-1e for my instance. So my ALB setting for AZ should match that, click on the "Edit Subnets" button to edit your AZ on your ALB

    0 讨论(0)
  • 2021-02-20 07:22

    Check if your heath check parameters in target group is properly configured

    protocol and port should be pointing to something where response header return 200 ok

    screenshot target group settings

    also, check if you EC2 heath check is ok or not and the Subnet you added to Alb should have at least 1 Ec2 running any of those subnets,

    check the security group also should allow ALB to look for EC2

    AwS link 3: https://i.stack.imgur.com/TEOnU.gif]2

    AWS Link 4

    0 讨论(0)
  • 2021-02-20 07:25

    I was running into this issue, and also getting a 504 Gateway timeout, and it ended up being this missing rule from the documentation.

    1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

    2. In the left navigation, choose Security Groups.

    3. Choose the security group that your container instances use. If you created your container instances by using the Amazon ECS first run wizard, this security group may have the description, ECS Allowed Ports.

    4. Choose the Inbound tab, and then choose Edit.

    5. For Type, choose All traffic.

    6. For Source, choose Custom, and then type the name of your Application Load Balancer security group that you created in Configure Security Groups. This rule allows all traffic from your Application Load Balancer to reach the containers in your tasks that are registered with your load balancer.

    7. Choose Save to finish.

    0 讨论(0)
  • 2021-02-20 07:26

    Just add new AZs by clicking on the Edit Subnet under the Load Balancer description.

    0 讨论(0)
提交回复
热议问题