在MAC上本地运行计时器触发了Azure功能(在docker内部)

时间:2019-11-14 00:23:17

标签: node.js macos timer azure-functions

我正在尝试在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",

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

我可以重现此错误,我使用本地Windows pc进行测试。当您使用UseDevelopmentStorage=true并且Storage Emulator没有启动时,会出现此错误。

因此,请通过存储连接设置AzureWebJobsStorage或在本地环境中启动Storage Emulator。启动存储模拟器后,它将可以使用。

enter image description here