本文介绍了AWS ELB负载平衡器使运行状况检查(HTTP)失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的EC2实例上,我的应用程序使用端口80,因此无法安装Apache来简单地使ELB运行状况检查成功.

On my EC2 instance my app is using Port 80, so cannot install Apache to simply get the ELB health check succeed.

对于ELB上的运行状况检查设置,我正在使用端口-HTTP/80Ping路径-/index.html

For health check settings on the ELB, I am using port - HTTP/80Ping Path - /index.html

我还将这个index.html放在/var/www和/var/www/html/目录中.

And I have placed this index.html at the /var/www and /var/www/html/ directories as well.

<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<BODY>
   <H1>Hi</H1>
   <P>Hello to the World.</P> 
</BODY>
</HTML>

任何线索为何无法通过健康检查?没有这个,就没有流量去我的EC2实例.

Any clue why this is failing health check? Without this, no traffic is going to my EC2 instance.

推荐答案

发现了问题..一旦我为我的LB创建了一个新的安全组并将其保留为EC2 SG的IB,它就可以正常工作.在LB&中保持相同的SG EC2出于任何原因使其崩溃.

Found the issue .. once I created a new security group for my LB and kept that as IB for the SG used for EC2 it worked fine. Keeping the same SG across LB & EC2 is making it break for whatever reason.

http://docs.aws.amazon. com/elasticloadbalancing/latest/classic/elb-security-groups.html

这篇关于AWS ELB负载平衡器使运行状况检查(HTTP)失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 20:55