eedwards
eedwards

Reputation: 95

Azure Function 'Error: The function runtime is unable to start' when deploying from source control

I'm trying to deploy a v2 function from source control and getting the error 'Error: The function runtime is unable to start'.

I've done some research into the error and I've found this can be due to IP restrictions set for your function. I removed the IP restrictions and still getting the same error message.

Upvotes: 0

Views: 1775

Answers (1)

eedwards
eedwards

Reputation: 95

Managed to resolve this now. Needed to set the runtime in the ARM template 'appSettings' for then function:

"name": "FUNCTIONS_EXTENSION_VERSION", "value": "~2".

Also, even though I removed the IP restrictions I needed to delete the resource group and deploy it again. When I looked in the automation script in the portal they were still in the script, which would have been causing the error.

Update: Got another runtime error, this time it was due to WEBSITE_CONTENTAZUREFILECONNECTIONSTRING and WEBSITE_CONTENTSHARE missing from ARM template when on a consumption plan. Full ARM template in link below:

https://learn.microsoft.com/en-us/azure/azure-functions/functions-infrastructure-as-code#deploy-a-function-app-on-the-consumption-plan

Upvotes: 2

Related Questions