JeroenW
JeroenW

Reputation: 763

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:

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:

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?

Upvotes: 9

Views: 4045

Answers (1)

JeroenW
JeroenW

Reputation: 763

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..

Upvotes: 9

Related Questions