【问题标题】:Azure functions deploy from github actions results in Error: connect ECONNREFUSED 127.0.0.1:443Azure 函数从 github 操作部署导致错误:连接 ECONNREFUSED 127.0.0.1:443
【发布时间】:2021-02-06 15:52:25
【问题描述】:

我从here 获得的.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!

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

【问题讨论】:

  • 请发布您为部署所做的工作。
  • 遇到和你一样的问题,受益于使用 AWS 中的其他功能,我想知道正确的方向是否指向他们。 AWS 不存在此类错误(或至少在我的经验中)。

标签: azure azure-functions github-actions


【解决方案1】:

我遇到了完全相同的错误。 我在 .net core 3.1 中创建了一个原始的 http 触发功能,一个新的 Azure 功能,下载了配置文件以发现 Microsoft 负责的 url 问题不正确。 克服它,然后我会得到与上述相同的结果。

这真令人气愤。从基础开始工作,但它失败了。 网址问题在这里找到: https://docs.microsoft.com/en-us/answers/questions/137869/publish-profile-publishurl-needs-to-be-adjusted-af.html

问题在于更新的网址。

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

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"

哪个有效!

希望这对某人有所帮助。

【讨论】:

    猜你喜欢
    • 2020-09-19
    • 1970-01-01
    • 2022-12-23
    • 2021-04-21
    • 2020-12-11
    • 2019-03-15
    • 2021-03-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多