Azure Functions - Event Hub not triggering Functions
Asked Answered
S

1

6

I have an Azure infrastructure:

2 HTTP Functions -> Event Hub -> 2 Functions -> Table Storage

(so two http functions sending messages to event hub, and two functions triggered by messages in Event Hub, one of them saving message in table storage)

The infrastructure is daily automatically created by Azure ARM templates, with the use of Azure CLI. I haven't changed the logic in recent two months but since beginning of April I have noticed the new, weird behaviour.

At the end of setting up, E2E tests are executed automatically. They are sending some message and after some time they check, if message are in table storage.

And here is the problem: since beginning of April these tests almost always fail! And I did not change anything in logic of function or template.json's for infrastructure.

It looks that Functions that should be triggered by Event Hub are not executed at all! I have already found a workaround for it - if I go to Azure portal and run these functions manually ("Run" button above code editor), then the functions finally starts to work!

Does anybody else encounter this problem? Is there some way to automatically, directly run non-HTTP triggered function by e.g. Azure CLI or REST interface?

Shred answered 16/4, 2018 at 6:21 Comment(2)
What's your function runtime version? v1 or v2?Sequestrate
Runtime version: 1.0.11612.0 (~1)Shred
S
3

It seems that problem is already quite well known: https://github.com/Azure/Azure-Functions/issues/210

I'm using currently workaround from this issue, i.e. calling Azure CLI's method to synchronize function triggers after creating infrastructure and zip pushing of functions:

az resource invoke-action --resource-group <resourceGrouName> --action syncfunctiontriggers --name <functionAppName> --resource-type Microsoft.Web/sites
Shred answered 23/4, 2018 at 17:46 Comment(2)
This... helped? I'm using two different triggers from two different event hubs to trigger two different functions within the same function app. Before, one worked and the other didn't. After running this command, they've swapped and the formerly working one no longer works while the formerly non-working one now works. Wth??Bloomery
I tried execute on the cloud shell on the right top of the azure portal .But on clicking that the cloud shell is not opening properly. Getting this message and not connection. Requesting a Cloud Shell.Succeeded. Connecting terminal... Please let me know where we can execute the above command for the azure function in azure portalGiblet

© 2022 - 2024 — McMap. All rights reserved.