![](/img/trans.png)
[英]The listener for function 'functionName' was unable to start. <--- Forbidden
[英]The listener for function 'Function1' was unable to start when running a timer function
當我在 Azure Cloud 中運行我的計時器 function 應用程序時,出現以下錯誤。 這只是一個基本代碼,我希望日志顯示在 Insight 中。
public static class Function1
{
[FunctionName("Function1")]
public static void Run([TimerTrigger("0 * * * * *")]TimerInfo myTimer, ILogger log)
{
log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}");
}
}
這是我為確定此問題原因所做的解決方法:
"0 * * * * *"
and the connection string given from the storage account created in Azure portal, which is running successfully (in local): 2. 從 Azure 門戶中刪除了存儲帳戶,並嘗試在本地運行 function,這給了我錯誤: The listener for function Function1 was unable to start.
恢復存儲帳戶,然后部署到 Azure 門戶 Function App 並在雲中成功運行:
在 Azure 雲中,是的,正如@Skin所說,這將是一個存儲帳戶配置問題。
解決此問題的幾個步驟是:
AzureWebJobsStorage
值是否包含正確的存儲帳戶連接字符串。這是一個防火牆問題。 在存儲帳戶 > 網絡 > 防火牆和虛擬網絡下添加了適當的虛擬網絡和 Su.net
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.