Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deployed Azure Function (v2) not running

I have an Azure Function v2, which works locally. When deployed to Azure, everything seems to be in working order (bin folder containing binaries and function name folder with function.json).

However, when I check if they ran (viewing the logs), they aren't there on the monitor tab (No data available), the kudu log stream nor in the general function view:

2018-01-25T10:27:47  Welcome, you are now connected to log-streaming service.
2018-01-25T10:28:47  No new trace in the past 1 min(s).
2018-01-25T10:29:47  No new trace in the past 2 min(s).

Info:

  • Using a Timer triggered Azure Function v2 calling a:
  • Durable Function (but "normal" v2 functions do not work as well)
  • Using TFS to deploy the code to ARM generated resources

function.json:

{
  "generatedBy": "Microsoft.NET.Sdk.Functions.Generator-1.0.6",
  "configurationSource": "attributes",
  "bindings": [
    {
      "type": "timerTrigger",
      "schedule": "0 */1 * * * *",
      "useMonitor": true,
      "runOnStartup": false,
      "name": "timerInfo"
    }
  ],
  "disabled": false,
  "scriptFile": "../bin/Namespace.dll",
  "entryPoint": "Namespace.RetrieveRedisMetrics.RunOrchestrator"
}

I have:

  • Deleted the function in the Azure portal
  • Renamed the function
  • Removed the blob storage "azure-webjobs-hosts" and durable-lease (forgot the exact name) containers for the function

The behavior seems similar to https://github.com/Azure/Azure-Functions/issues/618, but there is no resolution or comment on that bug.

I can't share the information app name privately (according to https://github.com/Azure/azure-webjobs-sdk-script/wiki/Sharing-Your-Function-App-name-privately), since... The function isn't logging!

Any other ideas/recommendations?

like image 783
JeroenW Avatar asked Jan 25 '18 10:01

JeroenW


1 Answers

When trying to publish the function from Visual Studio to skip the TFS continuous delivery factor, I got the following popup:

Visual Studio AF v2 upgrade message

Apparently, you need to set the FUNCTIONS_EXTENSION_VERSION to beta.

ARM template:

{
    "name": "FUNCTIONS_EXTENSION_VERSION",
    "value": "beta" // was ~1
}

Azure portal (Azure Function Application Settings): Azure Function version

It also works with Continuous Delivery. Only problem now is that AF v1 (preview currently) takes 3 to 4 times longer than the AF v1. But that is another story..

like image 61
JeroenW Avatar answered Oct 04 '22 08:10

JeroenW