5

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.

Jayendran
  • 9,638
  • 8
  • 60
  • 103
See Sharp
  • 379
  • 1
  • 4
  • 11
  • Does this answer your question? [Azure Functions Portal error - The function runtime is unable to start](https://stackoverflow.com/questions/49213015/azure-functions-portal-error-the-function-runtime-is-unable-to-start) – Liam Jan 26 '20 at 19:39

3 Answers3

11

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.

Jerry Liu
  • 17,282
  • 4
  • 40
  • 61
  • This information is a little out of date. The console is not in the bottom tab of the azure function management window. That URL seems to no longer work – Liam Jan 15 '20 at 13:29
  • That URL works for me and I'm using the latest version of Azure Functions – Amicable Feb 12 '20 at 17:01
3

The URL does not work for me, but there is an easy way to get the same results. Go to Development Tools then Advanced Tools (Kudu). From the Debug console menu, choose CMD. Navigate LogFiles, then Application, then Functions, then Host. Then examine the log files.

Ken O Bonn
  • 31
  • 1
0

You can see the exception in the application Insight.

Open the application Insight from the 'Function Apps' page in the Azure portal:

enter image description here

Inside the Insight open the Failures:

enter image description here

You can see there all the exceptions, and drill inside each one of them.

amichai
  • 718
  • 9
  • 19