VNet 集成 FunctionApp 引发错误:连接尝试失败 [...](management.azure.com:443)

问题描述 投票:0回答:0

我设置了一个函数应用程序(在 S1 ASP 上运行,是的,应用程序设置包括 WEBSITE_CONTENTOVERVNET 1),它执行 MS Graph API 调用,在没有 vNet 配置/集成的情况下工作得很好。 现在,在我为我的函数应用程序设置 vNet 集成并且只允许通过选定的网络(函数应用程序集成到的子网)访问它的存储帐户并重新执行我的函数之后,我收到一个变成错误的警告:

WARNING: Unable to acquire token for tenant 'organizations' with error 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (management.azure.com:443)'

ERROR: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (management.azure.com:443) Exception : Type : System.Net.Http.HttpRequestException TargetSite : Name : MoveNext DeclaringType : System.Net.Http.HttpConnectionPool+<ConnectToTcpHostAsync>d__98, System.Net.Http, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03e5f7f21d50a6a MemberType : Method Module : System.Net.Http.dll Message : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. [...]

我显然尝试用谷歌搜索错误消息,但找不到任何对我有帮助的信息。顺便说一下,我在另一个租户中没有遇到这个问题,我可以在那里创建自己的 vNet。使用我的组织提供的 vNet 时出现此问题。它具有相似的配置但略有不同。它设置为使用自定义 dns 服务器和在“出站网络功能”下激活的路由表,该表包含 3 条直接路由,下一跳类型为“Internet”。

提前感谢您的时间!

我尝试将 ASP 更改为 elastic premium 并将应用程序设置添加到函数应用程序:

WEBSITE_CONTENTOVERVNET=1
WEBSITE_VNET_ROUTE_ALL=1

我还尝试在我的函数和 profile.ps1 的 begin{} 块中手动建立与 azure 的连接,方法是添加:

Connect-AzAccount -Identity
Set-AzContext -Subscription SubscriptionID

都没有用。好像是网络问题

networking azure-functions microsoft-graph-api azure-powershell vnet
© www.soinside.com 2019 - 2024. All rights reserved.