azure-functions-dotnet-worker: WorkerConfig for runtime: dotnet-isolated not found
I don’t see a specific issue for my use case so I’m creating a new one. Azure function app does not start after deployment. This works fine locally. Only when I deploy to Azure do I see this problem.
According to documentation, my configuration settings are correct:
- Function runtime version: ~4
- Function worker runtime: dotnet-isolated
- .NET version: 6.0
- OS: linux
- Deployment method: run from package
- Deployment tool: terraform
- Deployment source: Azure pipelines
Error message:
System.InvalidOperationException : WorkerConfig for runtime: dotnet-isolated not found at async Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher.InitializeAsync(IEnumerable`1 functions,CancellationToken cancellationToken) at /src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs : 236 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.ScriptHost.InitializeAsync(CancellationToken cancellationToken) at /src/azure-functions-host/src/WebJobs.Script/Host/ScriptHost.cs : 328 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.ScriptHost.StartAsyncCore(CancellationToken cancellationToken) at /src/azure-functions-host/src/WebJobs.Script/Host/ScriptHost.cs : 265 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService.UnsynchronizedStartHostAsync(ScriptHostStartupOperation activeOperation,Int32 attemptCount,JobHostStartupMode startupMode) at /src/azure-functions-host/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs : 309
var workerConfig = _workerConfigs.Where(c => c.Description.Language.Equals(_workerRuntime, StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
if (workerConfig == null && (functions == null || functions.Count() == 0))
{
// Only throw if workerConfig is null AND some functions have been found.
// With .NET out-of-proc, worker config comes from functions.
throw new InvalidOperationException($"WorkerConfig for runtime: {_workerRuntime} not found");
}
I’ve seen multiple posts about this on Stack Overflow and GitHub but so far I cannot find any resolution or work around.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 70 (18 by maintainers)
Publishing from Visual Studio 2022 gives me this error:
System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.
Output logs show:
The attempt to publish the ZIP file through https://{resource-name}.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code Conflict.
@Dragsaw I think there are two issues here. One is when you deploy without any functions, which is fixed in https://github.com/Azure/azure-functions-host/pull/8589.
But, the error also occurs when you deploy with functions, and I still get this error even if setting
linuxFxVersion
toDOTNET-ISOLATED|6.0
The following configuration works for us with bicep deployment:
linuxFxVersion
set toDOTNET-ISOLATED|6.0
,FUNCTIONS_EXTENSION_VERSION
to~4
andFUNCTIONS_WORKER_RUNTIME
todotnet-isolated
.Unless a .net function code is deployed to the azure function app, the portal shows “WorkerConfig for runtime: dotnet-isolated not found” error. The error goes away after a function using isolated process model is deployed, because if you look at the .net build output directory it includes a
worker.config.json
file and all necessary libraries.The worker config comes from the .net function package. While there are no functions in the resource the portal will keep showing the “dotnet-isolated not found” error.
@kshyju i do the deployment using the azure pipeline and it is successful, i think this issue is happening just after the deployment
@mahesh-maximus Were your deployment successful? An incomplete deployment would cause this error. could you try deploying using another approach, like using core tools?
We use this setting in our ARM template, so with us it didn’t solve the problem.
Same issue here indeed. We deploy to a staging slot, do a warm-up of our eventhub triggered function and when we swap the slot to production. During swap we see the following errors in application insights and they recover themselves but it causes downtime in the processing of events coming from event hubs during that period.
We have set the appsetting
FUNCTIONS_WORKER_RUNTIME=dotnet-isolated
to both the production and staging slot.Project can be found in this GitHub Repo: FunctionAppTest
I am having same issue. Created .NET 6.0 Isolated Function (with Http trigger) in Visual Studio 2022. Then When I run it in VS 2022, same error:
All the required nuget packages are installed
is there anything else is also required to run/debug the ‘.NET 6.0 Isolated functions’ locally in Visual Studio 2022?
Interestingly, I got this to work by upgrading to v3 of terraforms azurerm provider and using the new modules for function apps.
I tried direct publish to the Azure (VS 2022, Linux app) and it is failed (
System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. .
)I also tried ‘Docker Container Registry’ publish and it was succeed. But the function doesn’t start with the mentioned
WorkerConfig for runtime: dotnet-isolated not found
errorWe can investigate why that happened when published using CLI. Could you try manually changing the value to “dotnet-isolated” via portal and see that fixes the issue?