gpt4 book ai didi

node.js - 在 MAC 上本地运行定时器触发的 azure 函数(在 docker 中)

转载 作者:行者123 更新时间:2023-12-02 19:48:10 24 4
gpt4 key购买 nike

我正在尝试在 MAC 上(在 docker 内部)本地运行定时器触发的 nodejs azure 函数,但出现以下错误:

The listener for function 'Functions.MyTimerFunction' was unable to start. Microsoft.WindowsAzure.Storage: Connection refused. System.Net.Http: Connection refused. System.Private.CoreLib: Connection refused.

当我尝试使用 HTTP post 触发函数时,出现以下错误:

System.Private.CoreLib: Exception while executing function: Functions.DomainVerifier. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'myTimer'. Microsoft.WindowsAzure.Storage: Connection refused. System.Net.Http: Connection refused. System.Private.CoreLib: Connection refused.

这是在我的 local.settings.json 文件中:

"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsSecretStorageType": "files",

感谢任何帮助。

最佳答案

我可以重现这个错误,我用本地 windows pc 测试。当您使用 UseDevelopmentStorage=true 并且 Storage Emulator 未启动时,您会收到此错误。

因此,使用您的存储连接设置 AzureWebJobsStorage 或在您的本地环境中启动 Storage Emulator。启动存储模拟器后,它将工作。

enter image description here

关于node.js - 在 MAC 上本地运行定时器触发的 azure 函数(在 docker 中),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58847611/

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