Since we migrated ci.jenkins.io to AWS and introduced a transparent Docker registry mirror, we have seen random errors when Docker pull images from the registry.
Symptoms:
- The exact error is
ERROR: failed to read expected number of bytes: unexpected EOF
- The error only appears during layer pull: we saw other EOF during extraction or at the end of builds which are totally different problems.
- The datadog logs for the
registry source (the Docker "distribution" system deployed under the name hub-mirror in cijenkinsio-agents-2 EKS cluster) shows that the GET requests are responded with HTTP/200 but a body sizer of 0
See the description by @MarkEWaite in jenkinsci/docker#1996