部署的Azure功能(v2)未运行 [英] Deployed Azure Function (v2) not running
问题描述
我有一个Azure Function v2,可以在本地工作.部署到Azure后,一切似乎都处于正常状态(包含二进制文件的bin文件夹和带有function.json的函数名称文件夹).
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).
但是,当我检查它们是否运行(查看日志)时,它们不在监视器"选项卡(No data available
),kudu日志流或常规功能视图中:
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).
信息:
- 使用计时器触发的Azure Function v2调用a:
- 耐用的功能(但正常" v2功能不能正常工作)
- 使用TFS将代码部署到ARM生成的资源中
function.json:
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"
}
我有:
- 删除了Azure门户中的功能
- 重命名功能
- 删除了该功能的blob存储"azure-webjobs-hosts"和持久租用(忘记确切名称)容器
该行为似乎类似于 https://github.com/Azure/Azure-Functions/issues/618 ,但没有对该错误的解决方案或评论.
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?
推荐答案
当尝试从Visual Studio发布函数以跳过TFS连续传递因子时,出现以下弹出窗口:
When trying to publish the function from Visual Studio to skip the TFS continuous delivery factor, I got the following popup:
显然,您需要将FUNCTIONS_EXTENSION_VERSION
设置为beta
.
Apparently, you need to set the FUNCTIONS_EXTENSION_VERSION
to beta
.
ARM模板:
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "beta" // was ~1
}
Azure门户(Azure功能应用程序设置):
Azure portal (Azure Function Application Settings):
它也与连续交付一起使用.现在唯一的问题是AF v1(当前预览)所花费的时间是AF v1的3至4倍.但这是另一个故事.
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..
这篇关于部署的Azure功能(v2)未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!