从github操作部署Azure功能导致错误:connect ECONNREFUSED 127.0.0.1:443



我在.github/workflows文件夹中有以下yaml文件,我从这里得到了它。

name: Deploy Python project to Azure Function App
on:
[push]
env:
AZURE_FUNCTIONAPP_NAME: zypp-covid # set this to your application's name
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.'   # set this to the path to your web app project, defaults to the repository root
PYTHON_VERSION: '3.8'                 # set this to the python version to use (supports 3.6, 3.7, 3.8)
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@master
- name: Setup Python ${{ env.PYTHON_VERSION }} Environment
uses: actions/setup-python@v1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: 'Resolve Project Dependencies Using Pip'
shell: bash
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
python -m pip install --upgrade pip
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
popd
- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}

这导致了以下错误,这不是很有信息性,所以我不知道如何解决这个问题:

Using SCM credential for authentication, GitHub Action will not perform resource validation.
Error: ECONNREFUSED
Error: Execution Exception (state: ValidateAzureResource) (step: Invocation)
Error:   When request Azure resource at ValidateAzureResource, Get Function App Settings : Failed to acquire app settings (SCM)
Error:     Failed to fetch Kudu App Settings.
Error: connect ECONNREFUSED 127.0.0.1:443
Error:       Error: Failed to fetch Kudu App Settings.
Error: connect ECONNREFUSED 127.0.0.1:443
at Kudu.<anonymous> (/home/runner/work/_actions/Azure/functions-action/v1/node_modules/azure-actions-appservice-rest/Kudu/azure-app-kudu-service.js:62:23)
at Generator.throw (<anonymous>)
at rejected (/home/runner/work/_actions/Azure/functions-action/v1/node_modules/azure-actions-appservice-rest/Kudu/azure-app-kudu-service.js:6:65)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Deployment Failed!

有人能给我指正确的方向吗?

我也有同样的错误。我在.net core 3.1中创建了一个原始的http触发函数,这是一个新的Azure函数,下载了配置文件,发现了一个由微软负责的url问题,该问题是不正确的。过了那一关,我就会得到和上面一样的结果。

这令人愤怒。从根本上解决它,但它失败了。url问题可在此处找到:https://learn.microsoft.com/en-us/answers/questions/137869/publish-profile-publishurl-needs-to-be-adjusted-af.html

问题出在更新的url上。

发布配置文件中的原始测试场景是:

publishUrl="waws-prod-ln1-035.publish.azurewebsites.windows.net:443"

这个我改成了:

publishUrl="ps-az-02.scm.azurewebsites.windows.net:443"

它给出的结果与您的代码相同。

在从一个旧的个人资料中仔细检查后,在花了很多小时试图解决整个出版问题后,我改为:

publishUrl="ps-az-02.scm.azurewebsites.net:443"

哪个有效!

希望这能帮助到别人。

最新更新