天天看點

【Azure 應用服務】Python Function App重新部署後,出現 Azure Functions runtime is unreachable 錯誤

問題描述

Python Function App重新部署後,出現 Azure Functions runtime is unreachable 錯誤

問題解答

在Function App的門戶頁面中,登入Kudu站點(https://<yourfunctionappname>.scm.chinacloudsites.cn/)檢視Function的啟動日志. 發現其中有  Type Error , Gooble Protobuf Descriptor  cannot be created directly.

錯誤資訊如下:

【Azure 應用服務】Python Function App重新部署後,出現 Azure Functions runtime is unreachable 錯誤

是以問題的原因是:由于protobuf package的版本導緻部署時無法正常啟用runtime worker。

日志資訊中同時也給出了建議:

  1. 降低protobuf版本為protobuf==3.20.*
  2. 或者設定環境變量:export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python, 在Azure Function中,可以通過添加新的 Application Setting來實作。
【Azure 應用服務】Python Function App重新部署後,出現 Azure Functions runtime is unreachable 錯誤

 修改配置後。Function 運作成功,Azure Functions runtime is unreachable 錯誤消失。

參考資料

NA