gpt4 book ai didi

从 github 操作部署 Azure 函数会导致错误 : connect ECONNREFUSED 127. 0.0.1:443

转载 作者:行者123 更新时间:2023-12-03 03:56:09 26 4
gpt4 key购买 nike

我的 .github/workflows 文件夹中有以下 yaml 文件,该文件是从 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 }}

这会导致以下错误,该错误信息不多,因此我不知道如何解决此问题:

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

问题出在更新的网址上。

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

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"

这有效!

希望这对某人有帮助。

关于从 github 操作部署 Azure 函数会导致错误 : connect ECONNREFUSED 127. 0.0.1:443,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64502419/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com