Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Alright, I've been having this issue for a while now, and I've done a ton of googling for it but nothing has helped fix my issue yet. I've tried a bunch of things, some of them including, making sure my time is correctly set, and even trying different sources but nothing has worked.

Now, basically I'm trying to do ANYTHING with apt-get. Updates, installs, everything is extremely slow, it all hangs on [Waiting for Headers]. So I ran

sudo strace apt-get update

Now, this works for some mirrors, but others the script hangs and loops on this type of output

select(8, [5 6 7], [], NULL, {0, 500000}) = 0 (Timeout)
gettimeofday({1303320316, 668899}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [WINCH], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
99% [Waiting for headers]) = 26aders]", 26
select(8, [5 6 7], [], NULL, {0, 500000}) = 0 (Timeout)
gettimeofday({1303320317, 170040}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [WINCH], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
99% [Waiting for headers]) = 26aders]", 26
select(8, [5 6 7], [], NULL, {0, 500000}) = 0 (Timeout)
gettimeofday({1303320317, 671178}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [WINCH], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
99% [Waiting for headers]) = 26aders]", 26
select(8, [5 6 7], [], NULL, {0, 500000}) = 0 (Timeout)
gettimeofday({1303320318, 172636}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, [WINCH], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
99% [Waiting for headers]) = 26aders]", 26

Any help on this would be appreciated.

EDIT: As requested, I've uploaded a copy of my tcpdump while I was attempting to run the apt-get update. Here is the link http://pastebin.com/NvbgNxxV

EDIT: Here is a pcap file of my tcpdump output. It appears there are some files that apt-get is trying to get like files in the directory ubuntu/dists/maverick-updates/main/i18n/ .. no idea where i18n comes from, but I couldn't retrieve them from browsing the repos either.

http://www.easy-share.com/1914849692/tcpdump-out.pcap

share|improve this question
1  
Your strace is nearly worthless for debugging. A packet capture (tcpdump/wireshark) would be far more useful. If I was to gaze into a magic 8-ball for your answer I think it would tell me that the delays are being caused by your system trying to reach an IPv6 address but failing. –  Zoredache Apr 20 '11 at 18:12
    
Alright, I've updated my question with a link to the tcpdump output. If IPv6 is the issue, how would I go about fixing that? –  Dalton Conley Apr 20 '11 at 19:18
1  
Do you have any third party sources.list entries or repositories configured? You may want to post a tcpdump which at least contains only the protocols that matter, yours is very noisy and I lost interest pretty quickly. Try tcpdump tcp port 80. Also if you could output a pcap file instead of text (with the -w option) and upload it somewhere, we can load the file into wireshark and follow tcp streams easily, etc. tcpdump -s 1500 -w myfile.pcap tcp port 80 should do the trick. –  Kyle Smith Apr 20 '11 at 22:31
    
If IPv6 is the issue, then webupd8.org/2010/05/how-to-disable-ipv6-in-ubuntu-1004.html –  Zoredache Apr 20 '11 at 22:44
    
Interesting, well I've updated my post with the pcap file. I've tried to examine it in wireshark and .. well you can read my up date. –  Dalton Conley Apr 21 '11 at 20:59
add comment

1 Answer

It looks like you request too many files that don't exist and archive.ubuntu.com throws you in a black hole for your single HTTP session:

GET /ubuntu/dists/maverick/Release.gpg HTTP/1.1
HTTP/1.1 200 OK
GET /ubuntu/dists/maverick/main/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick/main/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick/multiverse/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick/multiverse/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick/restricted/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick/restricted/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick/universe/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick/universe/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-security/Release.gpg HTTP/1.1
HTTP/1.1 200 OK
GET /ubuntu/dists/maverick-security/main/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-security/main/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-security/multiverse/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-security/multiverse/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-security/restricted/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-security/restricted/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-updates/Release.gpg HTTP/1.1
HTTP/1.1 200 OK
GET /ubuntu/dists/maverick-updates/main/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-updates/main/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-updates/multiverse/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-updates/multiverse/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-updates/restricted/i18n/Translation-en.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick-updates/restricted/i18n/Translation-en_US.bz2 HTTP/1.1
HTTP/1.1 404 Not Found
GET /ubuntu/dists/maverick/Release HTTP/1.1

Now I'm not sure why there are no Translation files for en_US but I did find someone who said they resolved a similar issue by setting LANG to C prior to running apt. Try this:

LANG=C apt-get update
share|improve this answer
    
Thanks for looking into this for me, unfortunately that did not seem to resolve my issue. Now, I will say that I disabled IPv6 and apt-get update is running a lot smoother, but I'm still having the same issues with installing new things. Also, it seems very sporadic. Sometimes I guess it finds a repo that works well, and things download right away, other times it hangs forever. –  Dalton Conley Apr 22 '11 at 14:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.