简体   繁体   中英

Azure Function App : Error when loading V3 in portal for fresh function app?

I follow the documentation to setup an app function with runtime version V3 but it throws InternalServerError. How can I create an app function to work with V3? These are my steps:

  1. I create a fresh app service azure function app (in portal).
  2. When the resource is ready and without making any changes or enter any code in portal or deploy any code from VS, I go to Function App Settings and shows "~3" selected, Runtime version: Runtime version: loading... (it's stuck there) and error mssg in a box on the right hand side of the screen:

Error: Encountered an error (InternalServerError) from host runtime

I tried to select runtime version ~2 in Function Application settings, but the Runtime Version shows "loading..." and if I exit and go back to this function, it shows ~2 as selected but the InternalServerError continues to show and Runtime version shows "loading..."

If I change to version ~1 it works showing runtime version 1.012967.0. But I can't change back to V3 because it shows internalServerError again.

According to documentation "function apps are created in version 2.x of the runtime" but when I first created the function it seems to create it in V1?. Kudu showed at home/LogFiles/eventlog.xml "Provider Name="IIS AspNetCore Module V2"/"

I later tried to deploy my VS code into this function app with V3 functions in VS and portal but of course this would not work. And deploying V3 from VS with V1 in portal is not the suggested process by the documentation "Although the runtime version is determined by the FUNCTIONS_EXTENSION_VERSION setting, you should make this change in the Azure portal and not by changing the setting directly. "

Finally, if I try to create the app function from VS, it automatically creates it with V2 and when checking in the portal I get the same internalservererror. It only works with V1 1.0.12967.0 (~1).

Help really appreciated

Errors such as this can occur if AzureWebJobsStorage app setting is missing or invalid.

The reason for your problems is probably an issue with the selected Storage Account, since switching to a new one helps. Maybe there is a lock or something which blocked the account.

Azure Functions V3 are compatible with General Purpose V2 Storage Accounts - I just checked and we have a couple of them up and running.

In my case it was the WEBSITE_RUN_FROM_PACKAGE app setting that was empty due to some misconfigured Terraform. In my scenario its value should have been 1 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM