gpt4 book ai didi

Azure函数调用其他API,失败并显示 'A connection attempt failed because the connected party did not properly respond after a period of time,,,'

转载 作者:行者123 更新时间:2023-12-02 07:32:49 26 4
gpt4 key购买 nike

Azure 函数(计时器触发器)使用 Restsharp 对外部 API 进行 REST 调用,但失败并出现错误

A connection attempt failed because the connected party did notproperly respond after a period of time, or established connectionfailed because connected host has failed to respond. A connectionattempt failed because the connected party did not properly respondafter a period of time

外部 API 提供商已将所有 Azure 函数应用出站 IP 和本地系统 IP 添加到允许列表中。我的代码在本地运行良好,但在 Azure 上发布后,Azure 函数会抛出此错误。

我们 wrote code获取 Azure 函数内部的 IP,当 azure 函数在 azure 上运行时,它会给出一个来自出站 IP 地址且已列入白名单的 IP 地址。

还有其他可能被防火墙阻止的内容吗?当 Azure Function 进行外部调用时,它实际上会做什么。请问有什么引用资料吗?

最佳答案

谢谢ZainD365发布您的suggestion作为帮助其他社区成员的答案。

A connection attempt failed because the connected party did notproperly respond after a period of time,,,

“可以通过创建 Azure Virtual Network NAT gateway 来解决此错误。然后将 Web 服务防火墙上的静态 IP 地址列入白名单。”

有关类似问题的更多信息,请参阅以下链接:

GitHub 问题:Troubleshooting HttpRequestException "A connection attempt failed because the connected party did not properly respond..."

所以线程:How to call an API using time trigger Azure function

关于Azure函数调用其他API,失败并显示 'A connection attempt failed because the connected party did not properly respond after a period of time,,,',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69820683/

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