Numerous "write: connection reset by peer" on GitHub Actions (Runners) with default/bridge network mode
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Description
We noticed a large number of resets happening while pushing the images and cache to repositories (3rd parties).
write tcp 172.17.0.2:41332->_Redacted_:443: write: connection reset by peer
We saw this exacerbated around May - June, 2023. And they caused the image pushes to fail as the resets became more than the number of retries.
Reported this to GitHub and they helped us with investigations and provided a fix, which was to set the network to Host.
driver-opts: |
image=moby/buildkit:v0.11.6
network=host
Posting this here, as this could help others coming across it.
Tried various versions of Buildkit and as you could see in the config, this problem is there with 0.11.6. At the time of raising this issue, this is/was the latest version.
It was spotted by GitHub that the 'bridge' mode was the culprit.
May be someone from Buildkit can look into this, as the problem could be something not working cordially with GitHub's runners or the network provisions around them. It might be an issue with TTL being set too low.
This also seems similar to an earlier issue here:
Issue-2713
but it might not be the same problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the shown driver-opts configuration using BuildKit v0.11.6, comparing default bridge networking with network=host during image and cache pushes from GitHub Actions. Review the linked Issue-2713 and investigate whether the resets relate to bridge networking or TTL behavior; done means identifying the cause and recording a confirmed fix or limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github-actions
- Domain
- ci-cd, devops, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100