Supply step do not retry when error is connection reset by peer
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- go
- 领域
- build-system
调研方向
从下载 Go 的 supply/finalize 步骤开始,检查 issue 中描述的 curl 重试行为。使用提供的 cf run-task 命令复现该故障,并确认 connection-reset 错误会被重试;当下载不再因该错误立即失败时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?
{
...
"version": 0,
"min_cli_version": null,
"min_recommended_cli_version": null,
"api_version": "2.203.0",
"osbapi_version": "2.15",
}
cf version 7.5.0+0ad1d63.2022-06-04
What version of the buildpack you are using?
We have multiple applications, the below versions are used currently.
Version: 1.8.5, 1.8.7 and 1.8.12
If you were attempting to accomplish a task, what was it you were attempting to do?
Package staging randomly fails at supply/finalize step when downloading Go without attempting any retry.
What did you expect to happen?
The curl command already has retry mechanism, and it should retry if the attempts encounter any network connection problems.
What was the actual behavior?
If the error is "connection reset by peer", the curl command do not retry and immediately return error
see https://stackoverflow.com/questions/42873285/curl-retry-mechanism
Sample log output from running the same curl command
2023-07-18T18:17:02.90+0000 [APP/TASK/eab4dfa6/0] ERR % Total % Received % Xferd Average Speed Time Time Time Current
2023-07-18T18:17:02.90+0000 [APP/TASK/eab4dfa6/0] ERR Dload Upload Total Spent Left Speed
2023-07-18T18:17:03.07+0000 [APP/TASK/eab4dfa6/0] ERR 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
2023-07-18T18:17:03.74+0000 [APP/TASK/eab4dfa6/0] ERR 0 151M 0 142k 0 0 812k 0 0:03:10 --:--:-- 0:03:10 809k
2023-07-18T18:17:03.75+0000 [APP/TASK/eab4dfa6/0] ERR 33 151M 33 50.1M 0 0 59.3M 0 0:00:02 --:--:-- 0:00:02 59.3M
2023-07-18T18:17:03.75+0000 [APP/TASK/eab4dfa6/0] ERR curl: (56) OpenSSL SSL_read: Connection reset by peer, errno 104
2023-07-18T18:17:03.75+0000 [APP/TASK/eab4dfa6/0] OUT Exit: 56, Elapsed: 1
To reproduce, create a sample app(doesn't matter what app), then create a run-task that perpetually download the go binary
cf run-task app-1 --command 'while true; do start_time=$(date +%s); curl https://buildpacks.cloudfoundry.org/dependencies/go/go_1.19_linux_x64_cflinuxfs3_7e231ea5.tgz --location --retry 15 --retry-delay 2 --output /tmp/go.tgz; echo -n "Exit: $?, "; end_time=$(date +%s); elapsed=$(( end_time - start_time )); echo "Elapsed: $elapsed"; sleep 10; done'
Watch the app log output for errors.
Can you provide a sample app?
N/A
Please confirm where necessary:
- I have included a log output
- My log includes an error message
- I have included steps for reproduction
- 主要语言
- Go
- 星标
- 174
- 派生
- 389
- 平均合并
- 2 天 14 小时
- 30 天内合并 PR
- 12
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudfoundry/nodejs-buildpack 的其他 Issue
-
unscheduled
难度 1/5 1 小时以内 新手友好度 62/100
cloudfoundry/nodejs-buildpack#683 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
cloudfoundry/nodejs-buildpack#957 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
cloudfoundry/nodejs-buildpack#923 ·
维护者通常 1 天内回复
-
Misleading "PRO TIP" about missing "package-lock.json" (with `npm-shrinkwrap.json`)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 48/100
cloudfoundry/nodejs-buildpack#852 ·
维护者通常 1 天内回复
-
unscheduled
难度 4/5 3-5 天 新手友好度 30/100
cloudfoundry/nodejs-buildpack#655 · 1 条评论 ·
维护者通常 1 天内回复
查看 cloudfoundry/nodejs-buildpack 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
prime-radiant-inc/evener#4223 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
open-telemetry/opentelemetry-go-compile-instrumentation#1467 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
a:bug
难度 2/5 1-3 小时 新手友好度 80/100
gotify/server#1068 · 1 个 reaction ·
维护者通常 2 天内回复