通过 apt-cacher-ng 执行 debian jessie apt 失败

通过 apt-cacher-ng 执行 debian jessie apt 失败

使用直接连接时:

root@cc90861af3e4:/etc/apt/apt.conf.d# apt-get update

Hit http://security.debian.org jessie/updates InRelease 
Ign http://deb.debian.org jessie InRelease              
Hit http://deb.debian.org jessie-updates InRelease                                               
Hit http://deb.debian.org jessie Release.gpg                                                     
Hit http://deb.debian.org jessie Release
Get:1 http://security.debian.org jessie/updates/main amd64 Packages [641 kB]
Get:2 http://deb.debian.org jessie-updates/main amd64 Packages [23.1 kB]                                                                                                                                           
Get:3 http://deb.debian.org jessie/main amd64 Packages [9064 kB]                                                                                                                                                   
Fetched 9729 kB in 21s (448 kB/s)                                                                                                                                                                                  
Reading package lists... Done

使用 http 代理时:

root@cc90861af3e4:/etc/apt/apt.conf.d# apt-get update
Hit http://security.debian.org jessie/updates InRelease
Ign http://deb.debian.org jessie InRelease
Hit http://deb.debian.org jessie-updates InRelease
Get:1 http://security.debian.org jessie/updates/main amd64 Packages [641 kB]
Hit http://deb.debian.org jessie Release.gpg                                                                                                                                                                       
Get:2 http://deb.debian.org jessie-updates/main amd64 Packages [23.1 kB]
Hit http://deb.debian.org jessie Release                  
Get:3 http://deb.debian.org jessie/main amd64 Packages [9064 kB]
Fetched 9729 kB in 31s (305 kB/s)   
Reading package lists... Done

但是当使用apt-cacher-ng代理时会失败:

root@cc90861af3e4:/etc/apt/apt.conf.d# apt-get update
Ign http://security.debian.org jessie/updates InRelease
Ign http://security.debian.org jessie/updates Release.gpg
Ign http://security.debian.org jessie/updates Release
Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages
  500  Missing Content-Length
Ign http://deb.debian.org jessie InRelease
Hit http://deb.debian.org jessie-updates InRelease
Hit http://deb.debian.org jessie Release.gpg     
Hit http://deb.debian.org jessie Release         
Get:1 http://deb.debian.org jessie-updates/main amd64 Packages [23.1 kB]
Get:2 http://deb.debian.org jessie/main amd64 Packages [9064 kB]                                                                                                                                                   
Fetched 9087 kB in 16s (567 kB/s)                                                                                                                                                                                  
W: Failed to fetch http://security.debian.org/dists/jessie/updates/main/binary-amd64/Packages  500  Missing Content-Length

E: Some index files failed to download. They have been ignored, or old ones used instead.

相同的 apt-cacher 在其他系统上运行良好(针对 Ubuntu Trusty、Xenial、Artful 和 Bionic 进行测试)。

为什么 Debian 会失败?我还能检查什么?

相关内容