简体   繁体   English

部署槽中的 azure 函数无法访问 Azure 函数运行时?

[英]Azure Functions Runtime is not reachable for azure functions in deploymentslot?

I already have a function app with several functions deployed through devops pipeline.我已经有一个 function 应用程序,它具有通过 devops 管道部署的多个功能。 I want to implement deployment slots to my current environment so that we can have better availability.我想在我当前的环境中实现部署槽,以便我们可以有更好的可用性。 Followed this document from Microsoft https://docs.microsoft.com/en-us/azure/azure-functions/functions-deployment-slots After creating deployment slot.在创建部署槽之后,从 Microsoft https://docs.microsoft.com/en-us/azure/azure-functions/functions-deployment-slots遵循此文档。 I have edited my devops release pipeline so that the build gets deployed to staging deployment slot.我已经编辑了我的 devops 发布管道,以便将构建部署到暂存部署槽。 But the function runtime is always not reachable in deployment slot .但是 function 运行时在部署槽中始终无法访问 (which usually comes when function app doesnt have storage account access for functions) I have edited my Host.JSON from (通常在 function 应用程序没有功能的存储帐户访问权限时出现)我已经编辑了我的 Host.JSON

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingExcludedTypes": "Request",
      "samplingSettings": {
        "isEnabled": true
      }
    }
  }
}

to

{
  "version": "2.0",
  "extensions": {
    "durableTask": {
      "hubName": "staging"
    }
  },
  "logging": {
    "applicationInsights": {
      "samplingExcludedTypes": "Request",
      "samplingSettings": {
        "isEnabled": true
      }
    }
  }
}

Added Task hubs which Microsoft has made mandatory right now to use deployment slots https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-task-hubs?tabs=csharp添加了 Microsoft 现在强制使用部署槽https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-task-hubs?tabs=csharp的任务中心

But still Azure Function Runtime is not reachable.但仍然无法访问 Azure Function 运行时。 Did my research online but less documentation is available for Function App with deployment slots(that have Task Hubs).我是否在线进行了研究,但对于具有部署槽(具有任务中心)的 Function 应用程序可用的文档较少。 Can anyone help me where Iam getting wrong?谁能帮我在哪里出错? Any lead on this is very much helpful.这方面的任何线索都非常有帮助。

Try using the Azure CLI " az functionapp deploy " to run the deployment from your local machine to see if the same issue exists.尝试使用 Azure CLI“ az functionapp deploy ”从本地计算机运行部署,以查看是否存在相同的问题。 If it aslo fails, the problem should be laying on the configurations of your application or the new created deployment slot, rather than Azure Pipelines.如果它也失败了,问题应该出在应用程序的配置或新创建的部署槽上,而不是 Azure 管道上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM