问题描述
我有一个 Azure Function v2,可以在本地运行.部署到 Azure 后,一切似乎都正常运行(包含二进制文件的 bin 文件夹和带有 function.json 的函数名称文件夹).
但是,当我检查它们是否运行(查看日志)时,它们不在监视器选项卡上(No data available)、kudu 日志流也不在一般功能视图中:
2018-01-25T10:27:47 欢迎您,您现在已连接到日志流服务.2018-01-25T10:28:47 在过去 1 分钟内没有新的跟踪.2018-01-25T10:29:47 在过去 2 分钟内没有新的踪迹.信息:
- 使用定时器触发 Azure Function v2 调用:
- Durable Function(但普通"v2 函数也不能正常工作)
- 使用 TFS 将代码部署到 ARM 生成的资源中
function.json:
<代码>{"generatedBy": "Microsoft.NET.Sdk.Functions.Generator-1.0.6","configurationSource": "属性",绑定":[{"type": "timerTrigger","时间表": "0 */1 * * * *",useMonitor":是的,runOnStartup":假,名称":计时器信息"}],禁用":假,"scriptFile": "../bin/Namespace.dll",入口点":命名空间.RetrieveRedisMetrics.RunOrchestrator"}我有:
- 删除 Azure 门户中的函数
- 重命名函数
- 删除了函数的 blob 存储azure-webjobs-hosts"和耐用租赁(忘记了确切名称)容器
该行为似乎类似于
显然,您需要将 FUNCTIONS_EXTENSION_VERSION 设置为 beta.
ARM 模板:
<代码>{"名称": "FUNCTIONS_EXTENSION_VERSION","value": "beta"//是 ~1}Azure 门户(Azure 函数应用程序设置):
它也适用于持续交付.现在唯一的问题是 AF v1(目前是预览版)比 AF v1 花费的时间长 3 到 4 倍.但那是另一回事了..
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?
When trying to publish the function from Visual Studio to skip the TFS continuous delivery factor, I got the following popup:
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):
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 Function (v2) 未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)