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
复制场景:
func init --docker-only
命令az acr build --registry yourRegistryName --image durableFunction:v1 .
func kubernetes deploy --name durableFunction --namespace yourNameSpace --service-type ClusterIP --registry yourRegistryName
中部署功能应用正常启动,但是在HTTP发布请求中失败。但是,该相同的功能化应用程序也可以在Azure托管功能应用程序中使用。
两年前也有类似的issue报道,但现在正在发生。