gpt4 book ai didi

linux - 应用服务 Linux : VNET integration causes application and docker to not respond at all

转载 作者:行者123 更新时间:2023-12-03 01:33:09 25 4
gpt4 key购买 nike

我知道 VNET 集成仍处于预览阶段,但我希望有人仍然可以帮助我解决当前的问题。我的开发人员租户中有一个集成了 VNET 的应用程序服务 Linux,用于访问 VNET 后面的存储帐户(v2)。 Web 服务应用程序基于 Python,并使用 Gunicorn/flask 进行 http 请求,并使用 azure.storage.blob 包与存储帐户进行交互。

这一切在该租户上都运行良好,但是我们现在尝试在不同的租户上使用相同的解决方案,这会导致问题。我们使用预览版的 VNET 集成功能,还配置了端点(Microsoft.Storage 和 Microsoft.Web),但是当我们在集成后启动应用程序服务时,我们没有得到任何响应,也没有可用的 docker 日志记录、日志流没有反应。在开发商租户中,我们立即得到了回复。

此外,您等待 VNET 集成多长时间并不重要(可以视为通知)。当您尝试断开 VNET 集成时也会发生错误:

“无法从 Web 应用程序中删除 VNet:网关在指定时间段内未收到“Microsoft.Web”的响应。”

有趣的是,之后 VNET 集成不再可见,当我们再次启动应用程序服务时,一切都会恢复正常。我们还尝试使用仅启用应用程序服务集成的空虚拟网络,这会产生相同的问题。软件和配置完全相同,而且我们使用西欧的所有资源。

有谁知道我们可以在哪里进一步寻找以确定这个问题?或者是因为它仍处于预览阶段,并且根据位置它可以或不能工作......

问候,乔斯·艾勒斯

最佳答案

据我所知,对于与 VNet 的应用服务集成,您只需启用服务终结点 Microsoft.Storage,而不是同时启用 Microsoft.Storage Microsoft.Web。 VNet 集成 UI 会自动将子网委托(delegate)给 Microsoft.Web

对于regional VNet Integration故障排除,您可以检查以下内容:

  • is your destination a non-RFC1918 address and you do not have WEBSITE_VNET_ROUTE_ALL set to 1
  • is there an NSG blocking egress from your integration subnet
  • do you have enough permissions to set delegation on the integration subnet? During regional VNet Integration configuration, your integration subnet will be delegated to Microsoft.Web. The VNet Integration UI will delegate the subnet to Microsoft.Web automatically. If your account does not have sufficient networking permissions to set delegation, you will need someone who can set attributes on your integration subnet to delegate the subnet. To manually delegate the integration subnet, go to the Azure Virtual Network subnet UI and set delegation for Microsoft.Web.

此外,如果您使用Web App for Containers ,您需要修改 Docker 镜像才能使用 VNet 集成。在您的 docker 镜像中,使用 PORT 环境变量作为主 Web 服务器的监听端口,而不是使用硬编码的端口号。 PORT 环境变量由应用服务平台在容器启动时自动设置。阅读此example1example2 .

此外,还有一个ARM template部署应用服务 VNet 集成和存储服务端点供您引用。有时,部署顺序是一个问题。

关于linux - 应用服务 Linux : VNET integration causes application and docker to not respond at all,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60402037/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com