AWS负载平衡器坏网关错误和目标组不健康
我遵循了本教程: https://www.youtube.com/watch?v== o7s-eigrmai 要学会设置连接到Fargate的负载平衡器。 我还遵循了此答案: aws> aws> aws错误:这些可用性区都不包含健康的目标。请求正在路由到所有目标。在AWS中
检查我的安全组是否已正确链接。
但是,设置后,当我尝试访问负载平衡器URL时,我会遇到502不良网关错误。
我已经检查了负载平衡器上的“监视”选项卡,并且可以看到有一个请求。
我有2个安全组:
- VPC安全组(ECS)-SG -05C038A61C8A39401
- EC2 Secuts Secuther Group(Load load Balancer)
我所做的:
- 在我的集群下导航到服务,然后单击安全组。这将我带到了
- VPC安全组的VPC安全组,根据入站规则,我将类型和源更改为EC2安全组的所有流量
- 源
- 和 小组,在出站规则下,我将类型更改为VPC安全组的所有流量和目的地,
我的逻辑是,由于流量进入EC2负载均衡器,因此应将其出站定向到VPC Security Group
:
我能够 :我还直接使用IP地址访问服务
,我注意到我的目标组显示此错误并不断排出:
这些可用性区都不包含健康的目标。请求 正在路由到所有目标。
几分钟后,当我尝试访问DNS URL时,我会遇到此错误:
503服务暂时不可用
I have followed this tutorial: https://www.youtube.com/watch?v=o7s-eigrMAI to learn to setup my Load Balancer that connects to Fargate.
I have also followed this answer: AWS Error : None of these Availability Zones contains a healthy target. Requests are being routed to all targets. in AWS
To check if my security groups have been linked properly.
However, after setting it up, when I try to access my load balancer URL, I get a 502 Bad Gateway error.
I have checked on the monitoring tab on my load balancer and I can see that there was a request coming in.
I have 2 security groups:
- VPC Security Group (ECS) - sg-05c038a61c8a39401
- EC2 Security Group (Load Balancer) - sg-0d50dc5f42650f6b6
What I have done:
- Navigated to the Service under my Cluster and clicked on the Security group. This brings me to the VPC Security Group
- In the VPC Security group, under the inbound rules, I changed the type to All traffic and source to the EC2 Security Group
- Navigate to the EC2 screen and click on Security Group under Network Access
- In the EC2 Security Group, under outbound rules, I changed the type to all traffic and destination to the VPC Security Group
My logic is that since the traffic comes into the EC2 Load Balancer, its outbound should be directed to the VPC Security Group
NOTE:
I am able to access the service using the IP address directly
Also, I noticed that my target groups show this error and are constantly draining:
None of these Availability Zones contains a healthy target. Requests
are being routed to all targets.
And after a few minutes, I get this error when I try to access the DNS URL:
503 Service Temporarily Unavailable
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论