简体   繁体   English

负载平衡-Google计算引擎网络负载平衡器中的不正常实例

[英]Load balancing - unhealthy instances in google compute engine Network load balancer

I have installed my web application on 2 Windows based VMs of GCE.My application runs on 8080 port. 我已经在2个基于Windows的GCE VM上安装了Web应用程序。我的应用程序在8080端口上运行。

Steps followed for Netwrok Load Balancer : Netwrok负载均衡器遵循的步骤:

1) I created health checks for 8080 port. 1)我为8080端口创建了运行状况检查。 2) Added both my VMs and helathchecks to target pool. 2)将我的VM和helathchecks添加到目标池。 3) In forwarding rule I created a rule for 8080 port for that particular Target Pool. 3)在转发规则中,我为该特定目标池的8080端口创建了一条规则。

After this go to Target Pools and check the health of the VMs 之后,转到目标池并检查虚拟机的运行状况

Here a red symbol is shown against both the instances and message shown as "instance is unhealthy for ". 在这两个实例上均显示一个红色符号,并且消息显示为“实例不健康”。

I have added port 8080 in Firewall rules. 我在防火墙规则中添加了端口8080。

If any one can help, if I am doing anything wrong or there is some other way to setup the Load Balancer. 如果有人可以帮忙,或者我做错了任何事情,或者还有其他方法可以设置负载均衡器。

I believe this issue is not related to the fact that you are listening in port 8080. Health check will pass as long as your instances are able to communicate with the Metaserver (169.254.169.254 [1]) and response with a valid HTTP page. 我认为此问题与您正在端口8080上监听的事实无关。只要您的实例能够与Metaserver通信(169.254.169.254 [1])并使用有效的HTTP页面进行响应,运行状况检查就会通过。

You must be sure you have allowed communication on port 8080 on the Google Firewall and on your Windows firewall instance [2]. 您必须确保已允许Google防火墙上的8080端口和Windows防火墙实例[2]上的通信。 As a debugging you can try to ping the Metaserver and capturing IP packages to confirm if there is a 3 way handshake between the Metaserver and your GCE instance. 作为调试,您可以尝试对Metaserver进行ping操作并捕获IP软件包,以确认Metaserver与GCE实例之间是否存在3种握手方式。 Additionally you might want to try to do the setup with the same instances on port 80 to confirm if it is actually related to the port. 另外,您可能想尝试使用端口80上的相同实例进行设置,以确认它是否与端口实际相关。

[1] https://cloud.google.com/compute/docs/metadata [2] https://cloud.google.com/compute/docs/networking [1] https://cloud.google.com/compute/docs/metadata [2] https://cloud.google.com/compute/docs/networking

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM