Azure持久编排功能不存在,已禁用或不是编排器功能

时间:2020-10-18 12:08:56

标签: azure docker kubernetes azure-durable-functions azure-container-registry

Azure Durable HttpStart在client.start_new(req.route_params["functionName"], None, None)函数调用中失败。

Function应用程序可在本地开发环境中工作,即使在Docker容器中也是如此。部署到Azure Kubernetes服务后,HttpStart函数无法启动编排功能。

日志跟踪:

Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: Functions.DurableFunctionsHttpStart
 ---> Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException: Result: Failure
Exception: Exception: The function 'DurableFunctionsOrchestrator' doesn't exist, is disabled, or is not an orchestrator function. Additional info: No orchestrator functions are currently registered!
Stack:   File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/dispatcher.py", line 338, in _handle__invocation_request
    call_result = await fi.func(**args)
  File "/home/site/wwwroot/DurableFunctionsHttpStart/__init__.py", line 16, in main
    instance_id = await client.start_new(req.route_params["functionName"], None, None)
  File "/usr/local/lib/python3.7/site-packages/azure/durable_functions/models/DurableOrchestrationClient.py", line 82, in start_new
    raise Exception(exception_message)

系统概述:

Function runtime: 3.0.2630
Python version: 3.7.7
azure-functions: 1.3.1
azure-functions-durable: 1.0.0b9/1.0.0b7
Kubernetes version: 1.17.11
Node size: Standard_DS2_v2
OS type: Linux

Docker文件:

FROM mcr.microsoft.com/azure-functions/python:3.0-python3.7

ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    AzureFunctionsJobHost__Logging__Console__IsEnabled=true \
    WEBSITE_HOSTNAME=<ip-address>:<port>

COPY requirements.txt /
RUN pip install -r /requirements.txt

COPY . /home/site/wwwroot

复制场景:

  1. 从VSCode创建持久功能HttpStart应用。
  2. 使用func init --docker-only命令
  3. Docker命令az acr build --registry yourRegistryName --image durableFunction:v1 .
  4. 在AKS func kubernetes deploy --name durableFunction --namespace yourNameSpace --service-type ClusterIP --registry yourRegistryName中部署

功能应用正常启动,但是在HTTP发布请求中失败。但是,该相同的功能化应用程序也可以在Azure托管功能应用程序中使用。

两年前也有类似的issue报道,但现在正在发生。

0 个答案:

没有答案