根据您的描述,我们应该检查 LB Backend pools设置和Health probes设置。
1.检查后端池:
成功将虚拟机添加到后端池后,我们可以通过 Azure 门户找到它们,如下所示:
2.检查LB健康探测设置:
如果我们没有在 Web 服务器(Linux)中配置健康状态,我们应该使用默认设置,如下所示:
顺便说一句,我们可以在Azure 负载均衡器的诊断日志中启用日志记录,我们可以按照这篇文章来启用它。
我们将看到这样的健康探测日志(示例):
{
"records":[
{
"time": "2016-01-26T10:37:46.6024215Z",
"systemId": "32077926-b9c4-42fb-94c1-762e528b5b27",
"category": "LoadBalancerProbeHealthStatus",
"resourceId": "/SUBSCRIPTIONS/XXXXXXXXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX/RESOURCEGROUPS/RG7/PROVIDERS/MICROSOFT.NETWORK/LOADBALANCERS/WWEBLB",
"operationName": "LoadBalancerProbeHealthStatus",
"properties": {
"publicIpAddress": "40.83.190.158",
"port": "81",
"totalDipCount": 2,
"dipDownCount": 1,
"healthPercentage": 50.000000
}
},
{
"time": "2016-01-26T10:37:46.6024215Z",
"systemId": "32077926-b9c4-42fb-94c1-762e528b5b27",
"category": "LoadBalancerProbeHealthStatus",
"resourceId": "/SUBSCRIPTIONS/XXXXXXXXXXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX/RESOURCEGROUPS/RG7/PROVIDERS/MICROSOFT.NETWORK/LOADBALANCERS/WWEBLB",
"operationName": "LoadBalancerProbeHealthStatus",
"properties": {
"publicIpAddress": "40.83.190.158",
"port": "81",
"totalDipCount": 2,
"dipDownCount": 0,
"healthPercentage": 100.000000
}
}]
}
更新:
当我们添加 LB 后端池时,我们应该选择 VM NIC,如下所示: