排查使用 Azure 负载均衡器时出现的常见 Azure 部署错误Troubleshoot common Azure deployment errors with Azure Load Balancer

本文介绍了一些常见的 Azure 负载均衡器部署错误及其解决方法。This article describes some common Azure Load Balancer deployment errors and provides information to resolve the errors. 如果你正在查找有关错误代码的信息,但本文未提供这些信息,请告知我们。If you're looking for information about an error code and that information isn't provided in this article, let us know. 在此页的底部,你可以留下反馈。At the bottom of this page, you can leave feedback. 我们将跟踪 GitHub 问题的反馈。The feedback is tracked with GitHub Issues.

错误代码Error codes

错误代码Error code 详细信息和缓解措施Details and mitigation
DifferentSkuLoadBalancersAndPublicIPAddressNotAllowedDifferentSkuLoadBalancersAndPublicIPAddressNotAllowed 公共 IP SKU 和负载均衡器 SKU 必须匹配。Both Public IP SKU and Load Balancer SKU must match. 请确保 Azure 负载均衡器和公共 IP SKU 匹配。Ensure Azure Load Balancer and Public IP SKUs match. 对于生产型工作负荷,建议使用标准 SKU。Standard SKU is recommended for production workloads. 详细了解 SKU 中的差异Learn more about the differences in SKUs
DifferentSkuLoadBalancerAndPublicIPAddressNotAllowedInVMSSDifferentSkuLoadBalancerAndPublicIPAddressNotAllowedInVMSS 当未指定 SKU 或在没有标准公共 IP 的情况下部署 SKU 时,虚拟机规模集默认设置为“基本负载均衡器”。Virtual machine scale sets default to Basic Load Balancers when SKU is unspecified or deployed without Standard Public IPs. 在单个实例上使用标准公共 IP 重新部署虚拟机规模集,以确保选择“标准负载均衡器”,或者在从 Azure 门户部署虚拟机规模集时直接选择“标准 LB”。Re-deploy virtual machine scale set with Standard Public IPs on the individual instances to ensure Standard Load Balancer is selected or simply select a Standard LB when deploying virtual machine scale set from the Azure portal.
MaxAvailabilitySetsInLoadBalancerReachedMaxAvailabilitySetsInLoadBalancerReached 负载均衡器的后端池最多可包含 150 个可用性集。The backend pool of a Load Balancer can contain a maximum of 150 availability sets. 如果未为后端池中的 VM 显式定义可用性集,则每个 VM 都将进入其各自的可用性集。If you don't have availability sets explicitly defined for your VMs in the backend pool, each single VM goes into its own Availability Set. 因此,部署 150 个独立 VM 意味着会有 150 个可用性集,因此会达到限制。So deploying 150 standalone VMs would imply that it would have 150 Availability sets, thus hitting the limit. 一种解决方法是部署可用性集并将更多 VM 添加到其中。You can deploy an availability set and add additional VMs to it as a workaround.
NetworkInterfaceAndLoadBalancerAreInDifferentAvailabilitySetsNetworkInterfaceAndLoadBalancerAreInDifferentAvailabilitySets 对于基本 SKU 负载均衡器,网络接口和负载均衡器必须位于同一可用性集中。For Basic Sku load balancer, network interface and load balancer have to be in the same availability set.
RulesOfSameLoadBalancerTypeUseSameBackendPortProtocolAndIPConfigRulesOfSameLoadBalancerTypeUseSameBackendPortProtocolAndIPConfig 对于给定的负载均衡器类型(内部、公共),不能有多个规则使用由同一虚拟机规模集引用的相同后端端口和协议。You cannot have more than one rule on a given load balancer type (internal, public) with same backend port and protocol referenced by same virtual machine scale set. 更新规则以更改此重复规则创建操作。Update your rule to change this duplicate rule creation.
RulesOfSameLoadBalancerTypeUseSameBackendPortProtocolAndVmssIPConfigRulesOfSameLoadBalancerTypeUseSameBackendPortProtocolAndVmssIPConfig 对于给定的负载均衡器类型(内部、公共),不能有多个规则使用由同一虚拟机规模集引用的相同后端端口和协议。You cannot have more than one rule on a given load balancer type (internal, public) with same backend port and protocol referenced by same virtual machine scale set. 更新规则参数以更改此重复规则创建操作。Update your rule parameters to change this duplicate rule creation.
AnotherInternalLoadBalancerExistsAnotherInternalLoadBalancerExists 你只能使用一个“内部”类型的负载均衡器引用该负载均衡器后端的同一组 VM/网络接口。You can have only one Load Balancer of type internal reference the same set of VMs/network interfaces in the backend of the Load Balancer. 更新部署,以确保只创建一个相同类型的负载均衡器。Update your deployment to ensure you are creating only one Load Balancer of the same type.
CannotUseInactiveHealthProbeCannotUseInactiveHealthProbe 你的探测不能未被为虚拟机规模集运行状况配置的任何规则使用。You cannot have a probe that's not used by any rule configured for virtual machine scale set health. 确保主动使用已设置的探测。Ensure that the probe that is set up is being actively used.
VMScaleSetCannotUseMultipleLoadBalancersOfSameTypeVMScaleSetCannotUseMultipleLoadBalancersOfSameType 你不能有多个相同类型(内部、公共)的负载均衡器。You cannot have multiple Load Balancers of the same type (internal, public). 你最多可以有一个内部负载均衡器和一个公共负载均衡器。You can have a maximum of one internal and one public Load Balancer.
VMScaleSetCannotReferenceLoadbalancerWhenLargeScaleOrCrossAZVMScaleSetCannotReferenceLoadbalancerWhenLargeScaleOrCrossAZ 多放置组虚拟机规模集不支持基本负载均衡器。Basic Load Balancer is not supported for multiple-placement group virtual machine scale sets. 请改用标准负载均衡器。Use Standard Load Balancer instead.

后续步骤Next steps