針對 Azure Load Balancer 進行疑難排解Troubleshoot Azure Load Balancer

此頁面提供基本和標準 Azure Load Balancer 常見問題的疑難排解資訊。This page provides troubleshooting information for Basic and Standard common Azure Load Balancer questions. 如需標準 Load Balancer 的詳細資訊,請參閱標準 Load Balancer 概觀For more information about Standard Load Balancer, see Standard Load Balancer overview.

當負載平衡器的連線無法使用時,最常見的徵兆如下︰When the Load Balancer connectivity is unavailable, the most common symptoms are as follows:

  • Load Balancer 背後的 Vm 未回應健康情況探查VMs behind the Load Balancer aren't responding to health probes
  • Load Balancer 後方的 Vm 未回應設定埠上的流量VMs behind the Load Balancer aren't responding to the traffic on the configured port

當後端 VM 的外部用戶端通過負載平衡器時,用戶端的 IP 位址將會用於通訊。When the external clients to the backend VMs go through the load balancer, the IP address of the clients will be used for the communication. 請確定用戶端的 IP 位址已新增至 NSG 允許清單。Make sure the IP address of the clients are added into the NSG allow list.

沒有來自標準內部負載平衡器 (ILB) 的輸出連線能力No outbound connectivity from Standard internal Load Balancers (ILB)

驗證和解決方式Validation and resolution

標準 Ilb 預設是安全 的。Standard ILBs are secure by default. 基本 Ilb 允許 透過隱藏 的公用 IP 位址連接到網際網路。Basic ILBs allowed connecting to the internet via a hidden Public IP address. 這不建議用於生產工作負載,因為 IP 位址既不是靜態,也不是透過您所擁有的 Nsg 鎖定。This isn't recommended for production workloads as the IP address is neither static nor locked down via NSGs that you own. 如果您最近從基本 ILB 移至標準 ILB,您應該透過「 僅限輸出 」設定明確建立公用 ip,這會透過 NSG 鎖定 IP。If you recently moved from a Basic ILB to a Standard ILB, you should create a Public IP explicitly via Outbound only configuration, which locks down the IP via NSGs. 您也可以使用子網上的 NAT 閘道You can also use a NAT Gateway on your subnet.

無法針對在後端集區中部署虛擬機器擴展集的負載平衡器,變更其現有 LB 規則的後端埠。Can't change backend port for existing LB rule of a load balancer that has virtual machine scale set deployed in the backend pool.

原因:無法修改虛擬機器擴展集所參考負載平衡器的健康情況探查所使用的負載平衡規則的後端埠Cause: The backend port cannot be modified for a load balancing rule that's used by a health probe for load balancer referenced by virtual machine scale set

解決 方式為了變更埠,您可以藉由更新虛擬機器擴展集來移除健康情況探查、更新埠,然後再次設定健康情況探查。Resolution In order to change the port, you can remove the health probe by updating the virtual machine scale set, update the port and then configure the health probe again.

從負載平衡器的後端集區移除 Vm 之後,小型流量仍會進入負載平衡器。Small traffic is still going through load balancer after removing VMs from backend pool of the load balancer.

若要確認,您可以進行網路追蹤。To verify, you can conduct a network trace. 您的 Blob 儲存體帳戶所使用的 FQDN 會列在每個儲存體帳戶的屬性內。The FQDN used for your blob storage accounts are listed within the properties of each storage account. 您可以從 Azure 訂用帳戶內的虛擬機器,執行 nslookup 來判斷指派給該儲存體帳戶的 Azure IP。From a virtual machine within your Azure subscription, you can perform nslookup to determine the Azure IP assigned to that storage account.

其他網路擷取Additional network captures

如果您決定開啟支援案例,請收集下列資訊以便更快解決問題。If you decide to open a support case, collect the following information for a quicker resolution. 選擇單一的後端 VM 來執行下列測試︰Choose a single backend VM to perform the following tests:

  • 從 VNet 內的其中一個後端 Vm 使用 ps ping 來測試探查埠回應 (範例: ps ping 10.0.0.4: 3389) 並記錄結果。Use ps ping from one of the backend VMs within the VNet to test the probe port response (example: ps ping 10.0.0.4:3389) and record results.
  • 如果這些 ping 測試沒有收到任何回應,請在執行 PsPing 時對後端 VM 和 VNet 測試 VM 同時執行 Netsh trace,然後停止 Netsh trace。If no response is received in these ping tests, run a simultaneous Netsh trace on the backend VM and the VNet test VM while you run PsPing then stop the Netsh trace.

處於失敗狀態的 Load BalancerLoad Balancer in failed state

解決方法Resolution

  • 一旦您識別處於失敗狀態的資源,請移至 Azure 資源總管 並識別處於此狀態的資源。Once you identify the resource that is in a failed state, go to Azure Resource Explorer and identify the resource in this state.
  • 將右手邊的開關更新為 [讀取/寫入]。Update the toggle on the right-hand top corner to Read/Write.
  • 針對處於失敗狀態的資源,按一下 [編輯]。Click on Edit for the resource in failed state.
  • 依序按一下 PUT 和 GET,以確定布建狀態已更新為 [成功]。Click on PUT followed by GET to ensure the provisioning state was updated to Succeeded.
  • 然後,您可以在資源不在失敗狀態時,繼續執行其他動作。You can then proceed with other actions as the resource is out of failed state.

下一步Next steps

如果上述步驟無法解決問題,請開啟 支援票證If the preceding steps don't resolve the issue, open a support ticket.