Installer/wget is unable to retrieve files via a proxy

Bug #198138 reported by Jeff Balderson on 2008-03-03
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-cacher (Ubuntu)
busybox (Ubuntu)

Bug Description

Binary package hint: debian-installer

Installer is unable to retrieve files from apt-proxy/apt-cacher style proxies using "hostname:port", despite the fact that the dialogs say that it's valid.

1) Netbooted from /ubuntu/hardy/main/installer-sparc/20070308ubuntu31/images/sparc64/netboot/2.6/boot.img
2) manually set "" and "/ubuntu/" at the prompt for which repository to use

The problem seems to stem from the fact that the installer's version of wget appears to be hobbled in some fashion:

This is from a running i386 Hardy system on the same network:
jbalders@testbox:~$ wget -q -O - | grep ^Suite: | cut -d' ' -f 2

So, the proxy is definitely working, and none of my other machines have problems accessing it.

This is from the shell on the netbooted system:
~ # wget -q -O - | grep ^Suite: | cut -d' ' -f 2
wget: no response from server
~ # wget -q -O -
wget: no response from server

It can get to the server from the netbooted system if I drop the port:
~ # wget -q -O -
wget: server returned error 404: HTTP/1.1 404 Not Found
(note that port 80 is just a plain web sever, no Ubuntu packages, so the 404 is normal)

Jeff Balderson (jbalders) wrote :

By default, apt-cacher can also be accessed via Apache2 (if you have it installed).

As a workaround, you can set the mirror to:

"" and "/apt-cacher/ubuntu"

Although I didn't used to have to do this with Gutsy and prior.

Colin Watson (cjwatson) wrote :

I wonder if this is due to endianness confusion in busybox's wget implementation. Could you try using port 8738 (which happens to be 0x2222, and so the same in either host or network byte order), and see if that works?

Colin Watson (cjwatson) wrote :

Also, could you drop the -q from your manual tests? I'd like to see what the "Connecting to" message says.

Jeff Balderson (jbalders) wrote :

This test is with the apt-cacher server still running on port 9999
~ # wget -O -
wget: no response from server
~ # wget -O -
wget: Unable to connect to remote host ( Connection refused

This is with the apt-cacher server running on 8738
~ # wget -O -
wget: no response from server

This is via Apache (apt-cacher install sets up "Alias /apt-cacher /usr/share/apt-cacher/")
~ # wget -O - | grep ^Suite: | cut -d' ' -f 2

It appears to me that the problem isn't an endianness problem, but rather that the busybox implementation of wget had a regression between Gutsy and Hardy such that it no longer works with apt-cacher or apt-proxy since it doesn't believe it's getting a response from the server.

I ran tcpdump on the server. I ran "wget -O -" from the installer's busybox. The request from the client:
GET /ubuntu//dists/hardy/Release HTTP/1.1


User-Agent: Wget

Connection: close

Then there's an ack back to the client, and then a FIN/ACK back to the client.

From an installed client, the request looks like this:
GET /ubuntu//dists/hardy/Release HTTP/1.0

User-Agent: Wget/1.10.2

Accept: */*


Connection: Keep-Alive

HTTP/1.1 200 OK
Connection: Keep-Alive

Accept-Ranges: bytes
Content-Length: 65852
Content-Type: text/plain; charset=UTF-8
Last-Modified: Fri, 18 Apr 2008 16:46:10 GMT

Jeff Balderson (jbalders) wrote :

It should also be noted that I found a new version of the netboot installer had been released. All of the above tests were performed booted from

MikeM (michaelm) wrote :


I have also encountered this problem. the busybox wget works against an apt-cacher via apache but not directly against the apt-cache daemon. I'm not sure what the root cause of this is and if it is due to the busybox wget not including a complete HTTP request header or if its a bug in apt-cacher's HTTP header handling. Eitherway, I have managed to patch apt-cacher to workaround/fix this issue.

Daniel T Chen (crimsun) on 2008-11-30
Changed in busybox:
importance: Undecided → Low
status: New → Confirmed

Marking as confirmed because a patch is there.

Changed in apt-cacher (Ubuntu):
status: New → Incomplete
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers