从github操作部署Azure函数导致错误:连接ECONNREFUSED 127.0.0.1:443 [英] Azure functions deploy from github actions results in Error: connect ECONNREFUSED 127.0.0.1:443

查看:72
本文介绍了从github操作部署Azure函数导致错误:连接ECONNREFUSED 127.0.0.1:443的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 .github/workflows 文件夹中有以下yaml文件,该文件是从

I have the following yaml file in my .github/workflows folder which I got from here.

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 }}

这会导致以下错误,但它的信息性不是很高,因此我不知道如何解决此问题:

This results in the following error which isn't very informative, so I have no clue how to solve this:

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!

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

Could someone point me in the right direction?

推荐答案

我有完全相同的错误.我在.net core 3.1中创建了一个原始的http触发函数(一个新的Azure函数),下载了配置文件以查找Microsoft负责的网址问题,这是不正确的.克服这些,然后我得到与上面相同的结果.

I had exactly the same error. I created a virgin http trigger function in .net core 3.1, a new Azure function, downloaded the profile to find a url issue that Microsoft are responsible for that was not correct. Get past that then I end up with the same as the above.

这真令人生气.从基础上进行操作会失败.网址问题可以在这里找到:https://docs.microsoft.com/zh-CN/answers/questions/137869/publish-profile-publishurl-needs-to-be-adjusted-af.html

This was infuriating. Working it through from basics and it fails. The url issue is found here: https://docs.microsoft.com/en-us/answers/questions/137869/publish-profile-publishurl-needs-to-be-adjusted-af.html

问题出在更新的网址上.

The problem lies with the updated url.

在我的测试场景中,来自发布配置文件的原始文件是:

The original in my test scenario from the publish profile was:

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

我更改为:

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

给出的结果与您的代码相同.

Which gives the same results as your code.

在从较早的配置文件中仔细检查后,经过数小时试图解决整个发布问题的麻烦之后,我更改为:

Upon close examination from an older profile, after many hours trying to trouble shoot the whole publishing problem, I changed to:

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

哪个有效!

希望这对某人有帮助.

这篇关于从github操作部署Azure函数导致错误:连接ECONNREFUSED 127.0.0.1:443的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆