# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 474A19E8
# echo "deb http://www.rudder-project.org/apt-3.2/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/rudder.list
# apt-get update
Get:1 http://www.rudder-project.org trusty InRelease [9,597 B]
…
Get:3 http://www.rudder-project.org trusty/main amd64 Packages [5,554 B]
…
Get:5 http://www.rudder-project.org trusty/main i386 Packages [5,552 B]
…
Ign http://www.rudder-project.org trusty/main Translation-en_US
Ign http://www.rudder-project.org trusty/main Translation-en
…
Fetched 52.4 kB in 9s (5,325 B/s)
W: Failed to fetch http://www.rudder-project.org/apt-3.2/dists/trusty/main/binary-amd64/Packages Hash Sum mismatch
W: Failed to fetch http://www.rudder-project.org/apt-3.2/dists/trusty/main/binary-i386/Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
The same error after "rm -Rf /var/lib/apt/lists/*".
# cat /etc/apt/apt.conf.d/01proxy
Acquire::http { Proxy "http://apt-proxy:3142"; };
So, the trouble appears at apt-cacher-ng, installed on host "apt-proxy".
# egrep -v '^\s*(#|$)' /etc/apt-cacher-ng/acng.conf
CacheDir: /var/cache/apt-cacher-ng
LogDir: /var/log/apt-cacher-ng
Port:3142
ReportPage: acng-report.html
ExTreshold: 4
LocalDirs: acng-doc /usr/share/doc/apt-cacher-ng
# ll /var/cache/apt-cacher-ng/www.rudder-project.org/apt-3.2/dists/trusty/
total 52
drwxr-sr-x 3 apt-cacher-ng apt-cacher-ng 4096 Jul 6 23:34 ./
drwxr-sr-x 3 apt-cacher-ng apt-cacher-ng 4096 Jul 6 13:41 ../
-rw-r--r-- 1 apt-cacher-ng apt-cacher-ng 9597 Jul 6 23:30 InRelease
-rw-r--r-- 1 apt-cacher-ng apt-cacher-ng 224 Jul 6 23:30 InRelease.head
drwxr-sr-x 4 apt-cacher-ng apt-cacher-ng 4096 Jul 6 13:41 main/
-rw-r--r-- 1 apt-cacher-ng apt-cacher-ng 8729 Jul 6 23:34 Release
-rw-r--r-- 1 apt-cacher-ng apt-cacher-ng 819 Sep 14 07:24 Release.gpg
-rw-r--r-- 1 apt-cacher-ng apt-cacher-ng 225 Sep 14 07:24 Release.gpg.head
-rw-r--r-- 1 apt-cacher-ng apt-cacher-ng 222 Jul 6 23:34 Release.head
"Release" is appreciable out-of-dated. But, wat's the reason (ubuntu repos etc. are renewing well)?
< HTTP/1.1 200 OK
< Last-Modified: Tue, 30 Aug 2016 14:51:49 GMT
< ETag: "1bee021-4ae1-53b4b1eceab40"
< Accept-Ranges: bytes
< Content-Length: 19169
< Accept-Ranges: bytes
< Date: Tue, 20 Sep 2016 14:21:48 GMT
< Age: 0
< Connection: keep-alive
< X-Cache: uncached
My current suspicion is that apt-cacher-ng implements some weak http parser, so it expects order like apache/nginx produces
< HTTP/1.1 200 OK
< Date: Tue, 20 Sep 2016 14:44:03 GMT
< Server: Apache/2.4.18 (Ubuntu)
< Last-Modified: Thu, 08 May 2014 14:19:03 GMT
< ETag: "60-4f8e429b803c0"
< Accept-Ranges: bytes
< Content-Length: 96
< Cache-Control: max-age=0, proxy-revalidate
< Expires: Tue, 20 Sep 2016 14:44:03 GMT
< HTTP/1.1 200 OK
< Server: nginx/1.4.6 (Ubuntu)
< Date: Tue, 20 Sep 2016 14:53:25 GMT
< Content-Type: application/octet-stream
< Content-Length: 58512
< Last-Modified: Thu, 08 May 2014 14:19:26 GMT
< Connection: keep-alive
< ETag: "536b926e-e490"
< Accept-Ranges: bytes
where "Date:"/"Server:" comes first.