“The function runtime is unable to start”

流过昼夜 提交于 2019-12-22 10:18:24

问题


I know it probably has something to do with a misconfiguration, but unfortunately the most info I get is

The function runtime is unable to start. Session Id: b939c608ae424150878a55eeac6e7d36 Timestamp: 2018-10-04T18:05:22.023Z

My function looks like

    [FunctionName("DoJob")]
    public static async Task DoJobAsync([ServiceBusTrigger("job-queue", Connection = "MyServiceBusConnection")] string json, ILogger log)
    {

       … 

    }

and my my local.settings.json is like

{
    "IsEncrypted": false,
    "Values": {
      "AzureWebJobsStorage": "UseDevelopmentStorage=true",
      "AzureWebJobsDashboard": "UseDevelopmentStorage=true",
      "MyServiceBusConnection": "[my service bus connection string]"
    }
}

The function app builds locally and publishes, but as soon as I navigate to it in the portal I get the above error.

I am using .NET Standard (V2) and the latest version 1.0.22.

Also, if I try to test in the portal I get 500 Internal Server Error but nothing shows up in Log Streaming.


回答1:


Without any further info, I assume you may forget to add MyServiceBusConnection in Application settings on Azure portal, which will cause same error you have seen.

If it's not the case, you could go to https://<functionappname>.scm.azurewebsites.net/DebugConsole and navigate to D:\home\LogFiles\Application\Functions\Host to see function runtime logs.



来源:https://stackoverflow.com/questions/52652997/the-function-runtime-is-unable-to-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!