公司架设了 Artifactory 服务器,用于缓存 Docker 镜像。再用 Nginx 反向代理对外提供服务。在下载 nvidia/tritonserver:20.08-py3 时出现以下错误。

Error response from daemon: pull access denied for nvidia/tritonserver, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

一直是 661cfc5bcb66 这一层出错。

尝试用 curl 直接下载这一层会出现以下错误。

curl: (18) transfer closed with outstanding read data remaining

再去查看 Artifactory 后台日志,出现以下错误。

Client Closed Request 499: java.net.SocketTimeoutException
httputil: ReverseProxy read error during body copy: unexpected EOF

这个问题在 Artifactory 服务器用 curl 测试是没有问题,总结规律是,当网速很快的情况下不会出问题,当网速不够快就会出问题。文件是 1.8 GB,出问题时下载速度是 10 MB/S。

将这些错误信息在谷歌上搜索,最终找到是 Nginx 默认配置下载 proxy_max_temp_file_size 是 1GB,才导致这个问题。将 proxy_max_temp_file_size 设置成 0,即不限制就解决了。


  1. Artifactory large downloads failing
  2. Issue with nginx configuration on large file downloads

发表回复

您的电子邮箱地址不会被公开。