<i id='ebUfH'><tr id='ebUfH'><dt id='ebUfH'><q id='ebUfH'><span id='ebUfH'><b id='ebUfH'><form id='ebUfH'><ins id='ebUfH'></ins><ul id='ebUfH'></ul><sub id='ebUfH'></sub></form><legend id='ebUfH'></legend><bdo id='ebUfH'><pre id='ebUfH'><center id='ebUfH'></center></pre></bdo></b><th id='ebUfH'></th></span></q></dt></tr></i><div id='ebUfH'><tfoot id='ebUfH'></tfoot><dl id='ebUfH'><fieldset id='ebUfH'></fieldset></dl></div>
    • <bdo id='ebUfH'></bdo><ul id='ebUfH'></ul>

      <tfoot id='ebUfH'></tfoot>

      <small id='ebUfH'></small><noframes id='ebUfH'>

      <legend id='ebUfH'><style id='ebUfH'><dir id='ebUfH'><q id='ebUfH'></q></dir></style></legend>

      部署的 Azure Function (v2) 未运行

      时间:2023-10-25
      • <legend id='9IvBo'><style id='9IvBo'><dir id='9IvBo'><q id='9IvBo'></q></dir></style></legend>

            <tfoot id='9IvBo'></tfoot>
              <bdo id='9IvBo'></bdo><ul id='9IvBo'></ul>

              <small id='9IvBo'></small><noframes id='9IvBo'>

                  <tbody id='9IvBo'></tbody>
                <i id='9IvBo'><tr id='9IvBo'><dt id='9IvBo'><q id='9IvBo'><span id='9IvBo'><b id='9IvBo'><form id='9IvBo'><ins id='9IvBo'></ins><ul id='9IvBo'></ul><sub id='9IvBo'></sub></form><legend id='9IvBo'></legend><bdo id='9IvBo'><pre id='9IvBo'><center id='9IvBo'></center></pre></bdo></b><th id='9IvBo'></th></span></q></dt></tr></i><div id='9IvBo'><tfoot id='9IvBo'></tfoot><dl id='9IvBo'><fieldset id='9IvBo'></fieldset></dl></div>

                本文介绍了部署的 Azure Function (v2) 未运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个 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) 未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:每 4 分钟发送一次保持活动请求时,Azure Functions 在消费计划中仍然“冷启动" 下一篇:调试测试时从 local.setting.json 读取值

                相关文章

                1. <legend id='WHwSt'><style id='WHwSt'><dir id='WHwSt'><q id='WHwSt'></q></dir></style></legend>
                2. <i id='WHwSt'><tr id='WHwSt'><dt id='WHwSt'><q id='WHwSt'><span id='WHwSt'><b id='WHwSt'><form id='WHwSt'><ins id='WHwSt'></ins><ul id='WHwSt'></ul><sub id='WHwSt'></sub></form><legend id='WHwSt'></legend><bdo id='WHwSt'><pre id='WHwSt'><center id='WHwSt'></center></pre></bdo></b><th id='WHwSt'></th></span></q></dt></tr></i><div id='WHwSt'><tfoot id='WHwSt'></tfoot><dl id='WHwSt'><fieldset id='WHwSt'></fieldset></dl></div>
                    <bdo id='WHwSt'></bdo><ul id='WHwSt'></ul>

                3. <tfoot id='WHwSt'></tfoot>

                    <small id='WHwSt'></small><noframes id='WHwSt'>