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

AWS EC2自托管GitHub Runner的actions/cache@v3下载故障排查

AWS EC2自托管GitHub Runner的Maven缓存步骤网络问题

环境与工作流配置

我在AWS EC2实例上运行自托管GitHub Runner,工作流中包含以下Maven依赖缓存步骤:

- name: Cache Maven dependencies
  if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
  id: cache
  uses: actions/cache@v3
  with:
    path: ~/.m2/repository
    key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
    restore-keys: ${{ runner.os }}-maven-

首次执行错误:SSL连接无法建立

执行该工作流时出现如下错误:

Download action repository 'actions/cache@v3' (SHA:88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8)
Warning: Failed to download action 'https://api.github.com/repos/actions/cache/tarball/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8'. Error: The SSL connection could not be established, see inner exception.
Warning: Back off 17.362 seconds before retry.
Error: The SSL connection could not be established, see inner exception.

直接在自托管Runner上执行wget访问该链接时,得到错误:

ubuntu@ip-11-224-36-17:~$ wget https://api.github.com/repos/actions/cache/tarball/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
--2023-07-27 08:37:25--  https://api.github.com/repos/actions/cache/tarball/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
Resolving api.github.com (api.github.com)... 140.82.121.6
Connecting to api.github.com (api.github.com)|140.82.121.6|:443... connected.
OpenSSL: error:0A000152:SSL routines::unsafe legacy renegotiation disabled
Unable to establish SSL connection.

尝试的修复操作

我在openssl.cnf文件中添加了以下配置:

openssl_conf = openssl_init
[openssl_init]
ssl_conf = ssl_sect
[ssl_sect]
system_default = system_default_sect
[system_default_sect]
Options = UnsafeLegacyRenegotiation

新出现的问题:连接被对等方重置

上述SSL错误解决后,工作流执行又出现新问题,直接wget访问时日志如下:

:~$ wget https://api.github.com/repos/actions/cache/tarball/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
--2023-07-27 13:40:10--  https://api.github.com/repos/actions/cache/tarball/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
Resolving api.github.com (api.github.com)... 140.82.121.5
Connecting to api.github.com (api.github.com)|140.82.121.5|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/actions/cache/legacy.tar.gz/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 [following]
--2023-07-27 13:40:11--  https://codeload.github.com/actions/cache/legacy.tar.gz/88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
Resolving codeload.github.com (codeload.github.com)... 140.82.121.9
Connecting to codeload.github.com (codeload.github.com)|140.82.121.9|:443... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.14 20:05:35