I have an error (Failed to start a new language worker for runtime: dotnet-isolated) after deploying the isolated Azure Function developed in dotnet 7

Varinderpal Singh Malhi 6 Reputation points
2022-12-08T10:42:55.787+00:00

I have an error after deploying the isolated Azure Function V4 developed in Dotnet 7. error custom details are as below:

{"FormattedMessage":"Failed to start a new language worker for runtime: dotnet-isolated.","LogLevel":"Error","prop__{OriginalFormat}":"Failed to start a new language worker for runtime: dotnet-isolated.","HostInstanceId":"e121133c-fce7-40a6-8158-a412d520dac7","Category":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher","ProcessId":"24"}
Complete details are as below:

[{"id":"45214701","outerId":"0","type":"System.Threading.Tasks.TaskCanceledException","message":"A task was canceled.","parsedStack":[{"level":0,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":1,"method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":2,"method":"Microsoft.Azure.WebJobs.Script.Grpc.GrpcWorkerChannel+<StartWorkerProcessAsync>d__53.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script.Grpc, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":271,"fileName":"/src/azure-functions-host/src/WebJobs.Script.Grpc/Channel/GrpcWorkerChannel.cs"},{"level":3,"method":"System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":4,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":5,"method":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher+<InitializeJobhostLanguageWorkerChannelAsync>d__51.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":154,"fileName":"/src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs"},{"level":6,"method":"System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":7,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":8,"method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":9,"method":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher+<InitializeJobhostLanguageWorkerChannelAsync>d__50.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":146,"fileName":"/src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs"},{"level":10,"method":"System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":11,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":12,"method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":13,"method":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher+<InitializeJobhostLanguageWorkerChannelAsync>d__49.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":137,"fileName":"/src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs"},{"level":14,"method":"System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":15,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":16,"method":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher+<>c__DisplayClass56_0+<<StartWorkerProcesses>b__0>d.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":229,"fileName":"/src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs"}],"severityLevel":"Error"}]
0
{"id":"45214701","outerId":"0","type":"System.Threading.Tasks.TaskCanceledException","message":"A task was canceled.","parsedStack":[{"level":0,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":1,"method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":2,"method":"Microsoft.Azure.WebJobs.Script.Grpc.GrpcWorkerChannel+<StartWorkerProcessAsync>d__53.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script.Grpc, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":271,"fileName":"/src/azure-functions-host/src/WebJobs.Script.Grpc/Channel/GrpcWorkerChannel.cs"},{"level":3,"method":"System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":4,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":5,"method":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher+<InitializeJobhostLanguageWorkerChannelAsync>d__51.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":154,"fileName":"/src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs"},{"level":6,"method":"System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":7,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":8,"method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":9,"method":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher+<InitializeJobhostLanguageWorkerChannelAsync>d__50.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":146,"fileName":"/src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs"},{"level":10,"method":"System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":11,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":12,"method":"System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":13,"method":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher+<InitializeJobhostLanguageWorkerChannelAsync>d__49.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":137,"fileName":"/src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs"},{"level":14,"method":"System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":15,"method":"System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess","assembly":"System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e","line":0},{"level":16,"method":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher+<>c__DisplayClass56_0+<<StartWorkerProcesses>b__0>d.MoveNext","assembly":"Microsoft.Azure.WebJobs.Script, Version=4.14.0.0, Culture=neutral, PublicKeyToken=null","line":229,"fileName":"/src/azure-functions-host/src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs"}],"severityLevel":"Error"}
exception
{"FormattedMessage":"Failed to start a new language worker for runtime: dotnet-isolated.","LogLevel":"Error","prop__{OriginalFormat}":"Failed to start a new language worker for runtime: dotnet-isolated.","HostInstanceId":"e121133c-fce7-40a6-8158-a412d520dac7","Category":"Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher","ProcessId":"24"}
Category
Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcFunctionInvocationDispatcher
FormattedMessage
Failed to start a new language worker for runtime: dotnet-isolated.
HostInstanceId
e121133c-fce7-40a6-8158-a412d520dac7
LogLevel
Error
ProcessId
24
prop__{OriginalFormat}
Failed to start a new language worker for runtime: dotnet-isolated.
PC
0. 0.0.0
devtest1006
d69eace19f1da88aefa0be947bc6851cb68885c32eebdef6f5ccaba71e782ab8
341b8655-67f8-4f11-b678-70936cd95279
devntdinfafl1006
96481cff-18a0-417e-9273-3c93db63d073
azurefunctions: 4.14.0.0
91faec76-7677-11ed-ab3b-d1cf6d835441
1

What would be the soultion. Is there something I have missed?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,029 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,962 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Mike Urnun 9,811 Reputation points Microsoft Employee
    2022-12-14T01:26:51.593+00:00

    Hello @Varinderpal Singh Malhi - Thanks for reaching out and posting on MS Q&A. Could you verify the correct value for the FUNCTIONS_WORKER_RUNTIME setting? It should be set to dotnet-isolated, as stated in the doc:

    270225-image.png

    -------------------------------------------------------------------------------

    Please consider contributing to MS Q&A by marking 'Accepted Answer' and ‘Upvoting’ as applicable.

    0 comments No comments

  2. Varinderpal Singh Malhi 6 Reputation points
    2022-12-16T20:25:43.58+00:00

    The issue is resolved. I had all the settings as per the documentation. The problem was the NuGet packages used in the solution. I was using Microsoft.WindowsAzure.Storage.blobs instead of Azure.Storage.Blobs. This replacement resolved the issue. Whenever the class was called ServiceWorker was failing and was not able to reload again and the error logged.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.