You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure DevOps中DownloadPipelineArtifact任务SSL连接随机失败问题

关于DownloadPipelineArtifact任务SSL连接随机失败的原因分析

场景与问题描述

我有一个包含build_stage和deploy_stage两个阶段的YAML流水线:

  • 构建阶段发布制品的任务配置:
- task: PublishPipelineArtifact@1
    inputs:
      targetPath: '$(Build.ArtifactStagingDirectory)'
      artifact: 'drop'
      publishLocation: 'pipeline'
      parallel: true
    displayName: 'Publish Pipeline Artifact: drop'
  • 部署阶段下载制品的任务配置:
- task: DownloadPipelineArtifact@2
    inputs:
      artifact: drop

当前DownloadPipelineArtifact任务执行耗时超60分钟,因大量下载失败需重试最终被终止,错误日志核心内容如下:

2023-05-03T01:54:21.1997791Z Verbose, Downloaded /APIM/APIManagementPolicies/OBRD/RT-SYD-ICC-logic-obrd-smo-putFeatures-operation-policy.xml
2023-05-03T01:54:21.1998640Z Verbose, Downloaded /APIM/Templates/RT-SYD-NPE-ICC-APM-apiTags.template.json
2023-05-03T01:54:21.1999251Z Verbose, Downloaded /APIM/APIManagementPolicies/OBRD/obrd-smo-API-Policy.xml
2023-05-03T01:54:21.1999972Z Verbose, Downloaded /OBRD/Functions/rt-syd-npe-dev-icc-obrd-storage-fa/Properties/ServiceDependencies/rt-syd-npe-dev-icc-obrd-storage-fa - Zip Deploy/appInsights1.arm.json
2023-05-03T01:54:21.2001337Z Verbose, [https://avhvsblobprodeau140.blob.core.windows.net/REDACTED/REDACTED?sv=2019-07-07&sr=b&spr=https&se=2023-05-04T02:32:53Z&sp=r&rscl=x-e2eid-REDACTED-session-REDACTED] Try 1/5, retryable exception caught. Retrying in 00:00:01. System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
2023-05-03T01:54:21.2002786Z  ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
2023-05-03T01:54:21.2003545Z  ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.

重试后下载通常能成功,以下是可能导致SSL连接随机建立失败的原因:

核心原因分析

  • 网络链路临时波动:
    日志中涉及的Azure Blob存储服务节点所在的网络链路出现临时拥堵、跨区域传输丢包或路由节点故障,导致TCP连接被远程主机强制关闭。这类随机性问题多和运营商路由调整、跨地域网络链路稳定性有关。

  • SSL/TLS握手层面问题:

    1. 代理或防火墙的SSL拦截规则随机触发,干扰了TLS握手流程;
    2. 构建代理的TLS版本与Blob存储服务的支持版本存在兼容性冲突,部分握手请求因版本协商失败被拒绝;
    3. 代理端的证书缓存过期或验证过程中出现临时错误,导致SSL连接无法正常建立。
  • Azure服务端限流:
    Azure Blob存储对并发连接数有默认限制,当部署任务发起大量并发下载请求时(尤其是制品包含大量小文件时,每个文件都会建立独立连接),服务端会主动关闭部分连接以维持负载稳定,从而出现随机失败的情况。

  • 构建代理资源不足:
    部署代理的CPU、内存或网络带宽耗尽,导致SSL握手过程无法及时完成,远程主机判定连接超时后强制关闭连接。

内容的提问来源于stack exchange,提问作者Coxy

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.23 08:25:31