【问题标题】:Error 502 after changing the application gateway in the AKS application gateway ingress controller在 AKS 应用程序网关入口控制器中更改应用程序网关后出现错误 502
【发布时间】:2023-01-03 00:26:18
【问题描述】:

在 agic 中更改应用程序网关后,我们无法再从 Internet 访问我们的应用程序。该应用程序分为各种微服务,这些微服务似乎仍在相互通信,但我们无法以任何方式连接。我们唯一的线索是在应用程序网关的“后端健康”刀片中,其中一个后端给我们这个错误“无法检索后端健康状态。当应用程序网关子网上的 NSG / UDR / 防火墙时会发生这种情况在 v1 SKU 的情况下阻止端口 65503-65534 上的流量,在 v2 SKU 的情况下阻止端口 65200-65535 上的流量,或者如果后端池中配置的 FQDN 无法解析为 IP 地址。要了解更多信息,请访问 - https: / /aka.ms/UnknownBackendHealth“浏览页面说这是进入 NSG 的流量问题,太糟糕了我们没有与 vnet 关联的 NSG ......我请求你的帮助来解除这种情况。

【问题讨论】:

    标签: azure-application-gateway ingress-controller


    【解决方案1】:
     The backend health status could not be retrieved. This happens when an NSG/UDR/Firewall on the application gateway subnet is blocking traffic on ports 65503-65534 in case of v1 SKU, and ports 65200-65535 in case of the v2 SKU or if the FQDN configured in the backend pool could not be resolved to an IP address. To learn more visit - [https://aka.ms/UnknownBackendHealth](https://aka.ms/UnknownBackendHealth).
    

    如果应用程序网关在启动时不动态更新后端池的 DNS 条目,则可能会出现此错误

    您可以使用以下 PowerShell 命令来解决如下问题:

    $appgw=Get-AzApplicationGateway -Name <appgw_name> -ResourceGroupName <rg_name>      
    Stop-AzApplicationGateway -ApplicationGateway $appgw      
    Start-AzApplicationGateway -ApplicationGateway $appgw 
    

    要获取 azure 应用程序网关:

    停止:

    开始:

    请注意,完成该过程可能需要一些时间

    参考:

    https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-backend-health-troubleshooting

    【讨论】:

    • 我们已经使用 azure cli 命令执行了网关的停止和启动,但没有成功,您放置的页面我们已经阅读了所有内容并尝试了每一个解决方案。感谢您的回答 :)
    【解决方案2】:

    最后发现问题出在发送给ingress controller的参数IP范围。 IP 范围与新应用程序网关使用的 IP 范围不兼容,我们通过关注此 guide 意识到了这一点。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-06-17
      • 2016-05-20
      • 2021-08-06
      • 2020-12-03
      • 2019-05-25
      • 2021-01-29
      • 2019-09-07
      相关资源
      最近更新 更多