4

我有一个同时具有Timer Trigger和功能的 AzureService Bus Trigger函数。在该 AF 的 Portal Azure 配置中,我有正确的存储帐户连接字符串AzureWebJobsStorage。两种资源的 ARM 都没有变化,直到几天前一切正常。现在只有Service Bus Trigger功能在工作,但不是Timer Trigger

将字符串连接到存储是 100% 正确的,我什至重新生成了访问密钥。

我找到了启动主机的日志:

2021-05-25T15:23:10.703 [Error] The listener for function 'XXX' was unable to start.
Microsoft.Azure.WebJobs.Host.Listeners.FunctionListenerException : The listener for function 'XXX' was unable to start. ---> System.InvalidOperationException : Could not create BlobServiceClient to obtain the BlobContainerClient using Connection: Storage
   at Microsoft.Azure.WebJobs.Script.AzureStorageProvider.GetBlobContainerClient() at D:\a\1\s\src\WebJobs.Script\StorageProvider\AzureStorageProvider.cs : 69
   at Microsoft.Azure.WebJobs.Extensions.Timers.AzureStorageScheduleMonitor.GetStatusBlobReference(String timerName) at D:\a\1\s\src\WebJobs.Script\Timer\AzureStorageScheduleMonitor.cs : 146
   at async Microsoft.Azure.WebJobs.Extensions.Timers.AzureStorageScheduleMonitor.GetStatusAsync(String timerName)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.Azure.WebJobs.Extensions.Timers.Listeners.TimerListener.StartAsync(CancellationToken cancellationToken) at C:\azure-webjobs-sdk-extensions\src\WebJobs.Extensions\Extensions\Timers\Listener\TimerListener.cs : 99
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.Azure.WebJobs.Host.Listeners.SingletonListener.StartAsync(CancellationToken cancellationToken) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Singleton\SingletonListener.cs : 70
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.Azure.WebJobs.Host.Listeners.FunctionListener.StartAsync(??) at C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Listeners\FunctionListener.cs : 68
   End of inner exception

我已经检查了诊断程序New Support Request -> Solutions,一切正常。此外,当尝试使用与 Portal Azure 相同的配置从 Visual Studio 启动 AF 时,会出现相同的错误(但描述性较差)。

有什么问题?我还可以检查什么来找到这个问题的解决方案?

4

2 回答 2

3

最新的函数宿主版本 (3.0.15733.0) 中可能存在回归。请设置应用设置 FUNCTION_EXTENSION_VERSION=3.0.15584.0(之前的函数运行时版本)。

回归将在下一个函数主机版本中修复: https ://github.com/Azure/azure-functions-host/releases

于 2021-05-27T22:49:44.450 回答
2

早些时候我们已经将 FUNCTION_EXTENSION_VERSION 从 ~3 更新到 3.0.15584.0,看起来 3.0.15733.0 的问题已经修复,我可以看到最新版本是 3.0.15960 ( https://github.com/Azure/azure-functions-主机/发布

但是,从早上开始,计时器触发器再次失败,所以我尝试将 FUNCTION_EXTENSION_VERSION 恢复为 ~3,但没有运气,因为函数抛出了同样的错误。但是如果我们将 FUNCTION_EXTENSION_VERSION 设置为 3.0.15960.0,计时器触发器就可以正常工作。

于 2021-06-27T18:13:32.263 回答