[Apt-cacher-ng-users] apt-cacher-ng "500 Invalid header" after download some files

Jasper Wallace jasper at pointless.net
Mon Sep 30 00:32:12 UTC 2013


On Sun, 29 Sep 2013, basti wrote:

> My ISP only support IPv4.

Hi,

So what i'm seeing is:

the apt-cacher-ng host is a normal x86 box.

when apt-get upgrading from a rpi the first few (5-10ish) downloads work, 
then i get "500  Invalid header", then all subsequent downloads fail.

If i try again it's able to download the next few and then the same 
problem again.

looking with strace shows:

[pid  1824] sendto(12, "GET /raspbian/pool/main/i/isc-dhcp/isc-dhcp-client_4.2.2.dfsg.1-5+deb70u6_armhf.deb
/HTTP/1.1\r\nUser-Agent: Debian Apt-Cacher-NG/0.7.11\r\nHost:
/mirrordirector.raspbian.org\r\nAccept: */*\r\nConnection:
/Keep-Alive\r\n\r\n", 209, MSG_NOSIGNAL, NULL, 0) = 209
[pid  1824] read(12, "und</h1>\n<p>The document has moved <a
/href=\"http://mirror1.oucs.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/pool/main/a/apt/apt-utils_0.9.7.8+rpi1_armhf.deb\">here</a>
.</p>\n<hr>\n<address>Apache/2.2.22
/(Debian) Server at mirrordirector.raspbian.org Port
/80</address>\n</body></html>\n", 70000) = 289
[pid  1824] shutdown(12, 2 /* send and receive */) = 0

so the reply from the server has the http response and headers cut off.

looking with tcpdump on the acng machine at the traffic to the
mirrordirector server shows:

The GET goes out to the mirrordirector server
we send a FIN/ACK to the server, closing the connection
some ACK's come back from the server for previous segments
the http response and headers come from the server (after the FIN) [1]
we send a RST from our end (cos we think the connection is closed)
the rest of the http response comes from the mirrordirector server [2]
we send a RST
we get a FIN/ACK

it's the packet at [2] that acng tries to read as the headers, the content
of [1] dosen't appear in the strace.

> Try this
> https://lists.alioth.debian.org/pipermail/apt-cacher-ng-users/2013-July/000075.html

will do when i've upgraded from 0.7.11

> And please use the Mailing list, then more people can help.

yes, sorry :)

> Regards,
> Basti
> 
> Am 28.09.2013 00:04, schrieb Jasper wallace:
> > Hi,
> > 
> > [sorry, last email was from the wrong address, please use this one, thanks!]
> > 
> > I've just had the same problem, afaict mirrordirector.raspbian.org may
> > not like the pipelineing that apt-cacher-ng does (?) it seems to close
> > the connection after a while, usually in the middle of a transfer.
> > 
> > Where you using ipv6 or ipv4?
> > 
> > What ISP where you using?
> > 
> 

-- 
[http://pointless.net/]                                   [0x2ECA0975]




More information about the Apt-cacher-ng-users mailing list