Hitting "Did not find any initialized language workers" on Azure App Service Plan

See original GitHub issue

I have a couple of environments on Azure, two running Azure Function Apps on Windows Consumption Plan, one running Azure Function App on App Service Plan (Linux).

I’m deploying the same code to all environments, but only Consumption plan works as expected, on Linux App Service Plan seeing these errors below. App Service Plan is P1v2 if that matters.

I used this command for adding the app service to previously created App Service Plan:

az functionapp create --resource-group Production --plan MyAppServicePlan --runtime dotnet-isolated --functions-version 3 --name myfunction --storage-account myfunctionstorage

Excerpt from the log:

'exceptionMessage':'Did not find any initialized language workers','exceptionType':'System.InvalidOperationException'}",07/28/2021 18:13:41
2021-07-28T18:13:41.411319516Z: [INFO]  fail: Host.Results[0]
2021-07-28T18:13:41.411325716Z: [INFO]  Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.HealthCheck
2021-07-28T18:13:41.411329916Z: [INFO]   ---> System.InvalidOperationException: Did not find any initialized language workers
2021-07-28T18:13:41.411334316Z: [INFO]     at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcherLoadBalancer.GetLanguageWorkerChannel(IEnumerable`1 rpcWorkerChannels, Int32 maxProcessCount) in /src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcherLoadBalancer.cs:line 27
2021-07-28T18:13:41.411339416Z: [INFO]     at Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher.InvokeAsync(ScriptInvocationContext invocationContext) in /src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs:line 283
2021-07-28T18:13:41.411351316Z: [INFO]     at Microsoft.Azure.WebJobs.Script.Description.WorkerFunctionInvoker.InvokeCore(Object[] parameters, FunctionInvocationContext context) in /src/azure-functions-host/src/WebJobs.Script/Description/Workers/WorkerFunctionInvoker.cs:line 93
2021-07-28T18:13:41.411356516Z: [INFO]     at Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters) in /src/azure-functions-host/src/WebJobs.Script/Description/FunctionInvokerBase.cs:line 82
2021-07-28T18:13:41.411360616Z: [INFO]     at Microsoft.Azure.WebJobs.Script.Description.FunctionGenerator.Coerce[T](Task`1 src) in /src/azure-functions-host/src/WebJobs.Script/Description/FunctionGenerator.cs:line 225
2021-07-28T18:13:41.411364616Z: [INFO]     at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`2.InvokeAsync(Object instance, Object[] arguments) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionInvoker.cs:line 52
2021-07-28T18:13:41.411369316Z: [INFO]     at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeWithTimeoutAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance instance) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 555
2021-07-28T18:13:41.411374116Z: [INFO]     at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstanceEx instance, ParameterHelper parameterHelper, ILogger logger, CancellationTokenSource functionCancellationTokenSource) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 501
2021-07-28T18:13:41.411382816Z: [INFO]     at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 279
2021-07-28T18:13:41.411387716Z: [INFO]     --- End of inner exception stack trace ---
2021-07-28T18:13:41.411392716Z: [INFO]     at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(IFunctionInstanceEx instance, FunctionStartedMessage message, FunctionInstanceLogEntry instanceLogEntry, ParameterHelper parameterHelper, ILogger logger, CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 326
2021-07-28T18:13:41.411397516Z: [INFO]     at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.TryExecuteAsync(IFunctionInstance functionInstance, CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Executors\FunctionExecutor.cs:line 94
2021-07-28T18:14:01.164936038Z: [INFO]  Hosting environment: Production
2021-07-28T18:14:01.166290638Z: [INFO]  Content root path: /app
2021-07-28T18:14:01.166856437Z: [INFO]  Now listening on: http://[::]:8081
2021-07-28T18:14:01.167329237Z: [INFO]  Application started. Press Ctrl+C to shut down.

Full log available here:

log.txt

Some of the settings in the configuration:

image

On other environments, with Windows Consumption plan, I have used these set of commands to create an app (per README):

az group create --name AzureFunctionsQuickstart-rg --location westeurope
az storage account create --name <STORAGE_NAME> --location westeurope --resource-group AzureFunctionsQuickstart-rg --sku Standard_LRS
az functionapp create --resource-group AzureFunctionsQuickstart-rg --consumption-plan-location westeurope --runtime dotnet-isolated --functions-version 3 --name <APP_NAME> --storage-account <STORAGE_NAME>

Some folks hitting the same issue here: link.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:47 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
Dinand01commented, Oct 16, 2021

Honestly I think this is a bug for the following reasons:

  • Windows functions support “Microsoft.AspNetCore”, Linux functions do not, they only support “Microsoft.NETCore” unless you use a custom image
  • This information is not documented anywhere

This is a huge time loss for people trying to use azure functions, in my opinion it should either be documented or there should not be any difference between windows and Linux runtimes.

6reactions
mnemcik-vismacommented, Nov 12, 2021

We’ve spent quite a lot of time with this one recently as well …
Whatever the case might be, just please provide a more meaningful message that will guide developers to the actual problem … it’s really a pain to find out the root cause of it …

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Function v3 Returns error 'Did not find any initialized ...
I have an Azure Function v3 that was running using the old dotnet runtime ... the error 'Did not find any initialized language...
Read more >
Azure function - "Did not find any initialized language ...
I'm running an Azure function in Azure, the function gets triggered by a file being uploaded to blob storage container. The function detects...
Read more >
Azure function - &quot;Did not find any initialized language ...
Coding example for the question Azure function - "Did not find any initialized language workers"
Read more >
Troubleshooting Azure function app: Did not find any ...
We deployed a very simple Azure function with nodejs runtime, on an Linux container. However after deployment, the service is not stable stable, ......
Read more >
How to debug a triggered, Azure Function app?
CoreLib: Exception while executing function: Functions.TimerTrigger1. Microsoft.Azure.WebJobs.Script: Did not find any initialized language ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found