question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ArgumentException "The function 'XYZ' doesn't exist" when the functions host recycles

See original GitHub issue

Issue

Given sufficient load on a function app, it’s possible that an orchestrator function will fail with the following exception during a host recycle:

{InstanceID}: Function 'XYZ (Orchestrator)' failed with an error. Reason: System.ArgumentException: The function 'ABC' doesn't exist, is disabled, or is not an activity function. Additional info: No activity functions are currently registered!
   at Microsoft.Azure.WebJobs.Extensions.DurableTask.DurableTaskExtension.ThrowIfFunctionDoesNotExist(String name, FunctionType functionType)
   at Microsoft.Azure.WebJobs.DurableOrchestrationContext.CallDurableTaskFunctionAsync[TResult](String functionName, FunctionType functionType, String instanceId, RetryOptions retryOptions, Object input)

This is caused by an incorrect validation check that occurs when the functions host is shutting down. The result is that the orchestration transitions into a Failed state.

This issue is expected to impact all versions of the Durable Functions extension.

Workaround

No known workarounds at this time. Any failed orchestrations will need to be restarted from the beginning.

Technical Details

The problem is that the DurableTaskListener “deregisters” a function when its listener is stopped by the functions runtime. It’s possible that an orchestrator function may still be running after the listener has been stopped, in which case the CallActivityAsync and CallSubOrchestratorAsync APIs will throw an exception because the target function is no longer listed.

The fix should be to relax this validation so that we don’t throw in the case where a function has been “delisted”, but rather allow the CallActivityAsync or CallSubOrchestratorAsync call to succeed. This will allow the message to be written to the queue, and once the listeners are startup up again, the function-call message can be picked up.

Issue Analytics

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

github_iconTop GitHub Comments

8reactions
ParthPuranicommented, Dec 9, 2019

Clearing azure emulator data solved problem for me,

cd C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator .\AzureStorageEmulator.exe clear all

Please educate me if this is the wrong approach.

0reactions
antoghcommented, May 5, 2020

@ParthPurani
Thanks, that helped. My problem started when I renamed some functions with more meaningful names

Read more comments on GitHub >

github_iconTop Results From Across the Web

Orchestrator function 'XYZ' failed: The function 'XYZ' doesn't ...
I'm trying to run Azure Orchestrations and I sunddenly I started getting the error from the statusQueryGetUri: Orchestrator function ' ...
Read more >
Troubleshoot error: Azure Functions Runtime is unreachable
This issue occurs when the Functions runtime can't start. The most common reason for this is that the function app has lost access...
Read more >
host.json reference for Azure Functions 2.x and later
The host.json metadata file contains configuration options that affect all functions in a function app instance. This article lists the settings ...
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