gpt4 book ai didi

Azure函数: Detected host offline in your function app

转载 作者:行者123 更新时间:2023-12-02 23:59:03 25 4
gpt4 key购买 nike

我们有一个与 VNET 集成的 Azure Function。函数使用 Key Vault 从中读取配置值。已在函数上启用 MSI,并在 KV 中添加访问策略以允许函数访问它。仅限允许来自上述 VNET 的 Key Vault 流量。我们昨天在诊断中收到了这个错误,这影响了我们的执行流程。该应用程序离线了几分钟,导致出现故障。诊断报告是这样说的:

Detected host offline in your function app.
Description
A host error has occurred during startup operation 'd732fccb-40ae-40a1-8d14-ea3cdba0e725'.
Last offline at
5/4/2021 10:32:13 AM
Details

Microsoft.Azure.KeyVault.Models.KeyVaultErrorException : Client address is not authorized and caller is not a trusted service.
Client address: x.x.x.x

该功能在停机约4分钟后开始正常工作。这可能是 VNET 集成的问题。有人遇到过这种情况吗?有什么办法可以防止这种情况发生吗?

最佳答案

在这种情况下,您可以添加 Azure 函数的应用程序设置 WEBSITE_VNET_ROUTE_ALL = 1,这将强制所有出站流量从 Azure 函数进入该 VNet。

When you route all of your outbound traffic into your VNet, it'ssubject to the NSGs and UDRs that are applied to your integrationsubnet. When WEBSITE_VNET_ROUTE_ALL is set to 1, outbound traffic isstill sent from the addresses that are listed in your app properties,unless you provide routes that direct the traffic elsewhere.

引用https://learn.microsoft.com/en-us/azure/azure-functions/functions-networking-options#regional-virtual-network-integration

关于Azure函数: Detected host offline in your function app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67397043/

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