projectkudu / kudu

Kudu is the engine behind git/hg deployments, WebJobs, and various other features in Azure Web Sites. It can also run outside of Azure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to use Linux App Service with Azure Functions because of what seems like issues with Kudu

DavidZidar opened this issue · comments

I have unsuccessfully been trying for two days to deploy a Azure Functions .NET Worker app to Linux App Service. Most of my attempts result in all requests to Kudu returning 503 Service Unavailable, one time it actually managed to start but my changes to app settings in the Azure Portal was never reflected in Kudu despite many attempts of restarting the app, stopping the app, waiting till the next day and so on.

Repro steps.

Create a new Azure Function app targeting Linux App Service on an app service plan (not consumption), set app setting FUNCTIONS_WORKER_RUNTIME to dotnet-isolated, Kudu is now entirely unavailable.

The one time I managed to get Kudu to start I opened the SCM site before changing app settings, but then my changes to app settings in the portal were never reflected in Kudu so any deployment I tried to make would fail because FUNCTIONS_WORKER_RUNTIME was stuck at the default value dotnet.

The log/error given by the failure.

503 Service Unavailable.

Mention any other details that might be useful.

I am using a B1 app service plan, I tried multiple times to delete the app and recreate it but always get the same result. I even tried creating a brand new app service plan, same result regardless.

@purva-vasudeo, @sanchitmehta, @rabollin and @abathinimsft please help with Kudu on Linux issue.

@suwatch Has anyone looked at this? I just tried it again and it is still broken.

Still broken. :(

Another month, still just getting 503 Service Unavailable from Kudu.

Hi @DavidZidar, thanks for reporting this. Can you please let us know your app name so that we can investigate further?

@purva-vasudeo Sure, thank you. My app is named screamer-dev-func-app, it's literally just a new blank function app that I changed one property on (FUNCTIONS_WORKER_RUNTIME). It is impossible to deploy any code because Kudu is non responsive.

Thanks @DavidZidar. Can you please try updating your LinuxFxVersion via Azure CLI to "DOTNET-ISOLATED|5.0". This is needed in addition to the app setting you have already set.

@purva-vasudeo Thank you, that did seem to make Kudu start working again. Is this documented anywhere? I have never seen this setting before, it is certainly not exposed in the UI and the magic string "DOTNET-ISOLATED|5.0" is hard to guess.

Now that I know what to search for I found this issue Azure/azure-functions-dotnet-worker#556 in which a lot of people seem to have related issues.

"DOTNET-ISOLATED|5.0" was added as a "hidden stack" in Azure/azure-functions-ux#5726

This file seems to be the only place where this magic setting is "documented"
https://github.com/Azure/azure-functions-ux/blob/bd2cca210707b9da93f4daf042fb17f1d4e83a13/server/src/stacks/2020-10-01/stacks/function-app-stacks/Dotnet.ts#L106

I'm closing this issue as I'm now successfully using functions in Linux, though it was rather rough getting it working but there are other issues covering those problems.