【Azure 应用服务】Python Function App重新部署后,出现 Azure Functions runtime is unreachable 错误 - LuBu0505/My-Code GitHub Wiki

问题描述

Python Function App重新部署后,出现 Azure Functions runtime is unreachable 错误

问题解答

在Function App的门户页面中,登录Kudu站点(https://.scm.chinacloudsites.cn/)查看Function的启动日志. 发现其中有  Type Error , Gooble Protobuf Descriptor  cannot be created directly.

错误信息如下: image

所以问题的原因是:由于protobuf package的版本导致部署时无法正常启用runtime worker。

日志信息中同时也给出了建议:

  1. 降低protobuf版本为protobuf==3.20.*
  2. 或者设置环境变量:export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python, 在Azure Function中,可以通过添加新的 Application Setting来实现。 image

修改配置后。Function 运行成功,Azure Functions runtime is unreachable 错误消失。

参考资料

NA

当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!

分类: 【Azure 应用服务】

标签: Azure FunctionAzure Functions runtime is unreachableDescriptor cannot be created directlyGooble ProtobufGooble Protobuf Descriptor