I'm setting up a Maverick server on a spare PC. The install completes fine and the system boots up into the shell. However, when I try to do a apt-get update , apt hangs on almost every entry with the message 99% [Waiting for headers] sometimes a message of 96 b/s appears on the far right. The actual percent that it claims also varies.

Searching around online gave a potential solution by using the option Acquire::http::Pipeline-Depth="0" this somewhat alleviates the problem, i.e. it stalls on every other entry with the same message as above.

If you wait it out (the whole update took about 4 hours), the update still fails as a good portion of the hits show a "unable to connect" or similar message, despite the fact that I can ping the server from the pc just fine.

The problem is also unrelated to the mirror used since I've tried about a dozen mirrors with no success, I've even tried commenting out everything but the main entry in sources.list and it still refuses to update.

The network connection is fine since I can ping and wget (apt won't let me install lynx until I run a successful update) just fine. I've also reinstalled the distro with no luck.

The only thing weird about the setup is that the PC is connecting to the internet through my windows laptop with ICS configured properly, but as I've said before, the network connection is fine.

A connection via ICS sounds like trouble waiting to happen, especially if one of the links is WiFi. Is it possible to connect more directly?
–
mswJan 3 '11 at 6:09

@msw not currently, but I was under the impression that ICS is just the equivalent of iptables forwarding for linux, what problems could it really cause? Assuming that it is working fine otherwise (which it is).
–
crasicJan 3 '11 at 7:21

I have little experience with ICS because I never thought it robust enough for any purpose, and given the poor administrative (debug) access into all Microsoft networking support have assumed it would bring headaches. Your experience below seems to confirm my assumption a bit.
–
mswJan 6 '11 at 4:47

2 Answers
2

There seems to be a fundamental issue with the implementation of ICS and IP forwarding in general on Windows XP it simply cannot handle multiple connections to the same server, maybe it's some weird combination of a bug with intentional incompetence (as I like to call it), but the end result is that XP cannot function as a competent router/proxy for a linux system (maybe the limitations are intentionally put in place for non-windows systems).

It is interesting to note that this is not only limited to ICS. There is a hidden option in the windows registry that allows IP forwarding for network interfaces and it suffers from the same problem.

The only solution - it appears - is to either change the network topology to avoid using ICS (either connecting directly, or buying a dedicated switch/access point), or to use a different OS to set up the temporary bridge. I used an ubuntu live-cd (it wasn't my computer or it would have been running some *nix to begin with) and enabled packet forwarding and ip masquerading so the computer behaves as a bona-fide router.

There are some rumours in the web (I can't verify them) about ICS problems with IP6. They said when ICS receives more than one IP6 connection it halts for a while. This could explain why wget works (only one connection), and apt-get update fails (lots of simultaneous connections).

You can try to disable IP6 in your server to test if this is the problem.

Then reboot and check if you can update. If it works at least you know where the problem is. You can either disable IP6 permanent, or plan a new setup. Note that IP6 disabling will be a temporal hack, IP6 seems like unavoidable in the near future.

To enable IP6 back, delete the previous lines from /etc/sysctl.conf and reboot.

ICS seems to be the culprit here, however your suggestion didn't fix it. After wiring the computer directly everything worked as expected. Now that I have the repositories updated, I can't even do an apt-get install through the ICS... hmmm.
–
crasicJan 3 '11 at 9:22

Maybe ICS has a problem with a large (or maybe modest) number of simultaneous connections to the same server.
–
Javier RiveraJan 3 '11 at 11:56

You dont need to reboot: after modifying sysctl.conf, type sysctl -a and you're good to go. you can also cut down the typing by using a here document instead of piping from echo all the time.
–
MeiNov 30 '11 at 15:42