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.

I'm running an Ubuntu server (x86) and recently I noticed that "sudo apt-get *" stopped working. For example, if I try and run "sudo apt-get update", it returns:

Err http://archive.ubuntu.com intrepid Release.gpg
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid/main Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid/restricted Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid/universe Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid/multiverse Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-updates Release.gpg
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-updates/main Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-updates/restricted Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-updates/universe Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-updates/multiverse Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-security Release.gpg
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-security/main Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-security/restricted Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-security/universe Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com intrepid-security/multiverse Translation-en_US
  Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid/Release.gpg  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid/main/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid/restricted/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid/universe/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid/multiverse/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-updates/Release.gpg  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-updates/main/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-updates/restricted/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-updates/universe/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-updates/multiverse/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-security/Release.gpg  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-security/main/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-security/restricted/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-security/universe/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/intrepid-security/multiverse/i18n/Translation-en_US.bz2  Could not resolve 'archive.ubuntu.com'

W: Some index files failed to download, they have been ignored, or old ones used instead.
W: You may want to run apt-get update to correct these problems

At first it seemed like a DNS issue, but I can ping 'archive.ubuntu.com' without any problem.

PING archive.ubuntu.com (91.189.88.46) 56(84) bytes of data.
64 bytes from lithium.canonical.com (91.189.88.46): icmp_seq=1 ttl=45 time=123 ms
64 bytes from lithium.canonical.com (91.189.88.46): icmp_seq=2 ttl=45 time=124 ms
64 bytes from lithium.canonical.com (91.189.88.46): icmp_seq=3 ttl=45 time=158 ms

Any Ideas on the problem or how to fix it?

share|improve this question
1  
could you add the output of ifconfig? –  sparks Nov 4 '09 at 2:42
    
ifconfig output added –  crgwbr Nov 4 '09 at 21:28
    
Can you telnet to archive.ubuntu.com on port 80? –  Zypher Nov 5 '09 at 1:16
add comment

5 Answers

It sounds like it could be a proxy issue. Do you have HTTP_PROXY env variable set, or do you have any "Proxy" settings in /etc/apt/* files (check in /etc/apt/apt.conf.d/)?

share|improve this answer
add comment

What is the output of the following commands?

dig archive.ubuntu.com

curl 'http://archive.ubuntu.com/'

cat /etc/resolv.conf

Also, is the result of running those commands any different is you run them as root? (I.e. sudo dig archive.ubuntu.com?

share|improve this answer
add comment

Try changing the URL to http://us.archive.ubuntu.com in /etc/apt/sources.list. From here in South Africa http://archive.ubuntu.com resolves to a different server to the one that you need to use. But http://us.archive.ubuntu.com does resolve to 91.189.88.46.

Using a different DNS server in /etc/resolv.conf can also fix the problem.

share|improve this answer
add comment

This is somewhat unlikely, but you may be having MTU issues.

You can test this two ways:

Method 1 - Changing your MTU size:

sudo ifconfig eth0 mtu 1492
sudo apt-get update

Continue lowering at 500ish increments until you get down to ridiculously small MTU sizes.

sudo ifconfig eth0 mtu 600
sudo apt-get update

Method 2 - Test an MTU problem by trying to send ping's of varying sizes

ping -s 1400 archive.ubuntu.com

If either of these work I'd recommend you keep testing until you find the maximum MTU size that works for you. It would be strange to have one random server encountering this problem with others working, but stranger things have been known to happen.

share|improve this answer
add comment

dig returns:

; <<>> DiG 9.4.2 <<>> archive.ubuntu.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19419
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;archive.ubuntu.com.            IN      A

;; ANSWER SECTION:
archive.ubuntu.com.     532     IN      A       91.189.88.30
archive.ubuntu.com.     532     IN      A       91.189.88.134
archive.ubuntu.com.     532     IN      A       91.189.88.135
archive.ubuntu.com.     532     IN      A       91.189.88.31
archive.ubuntu.com.     532     IN      A       91.189.88.40
archive.ubuntu.com.     532     IN      A       91.189.88.46
archive.ubuntu.com.     532     IN      A       91.189.88.45

;; Query time: 71 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Wed Nov  4 16:19:27 2009
;; MSG SIZE  rcvd: 148

/etc/resolv.conf contains: nameserver 129.168.0.1

ifconfig:

eth0      Link encap:Ethernet  HWaddr 00:14:6c:76:69:89
          inet addr:192.168.0.197  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::214:6cff:fe76:6989/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:19964625 errors:0 dropped:789 overruns:0 frame:0
          TX packets:11729444 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2505013589 (2.3 GB)  TX bytes:446515595 (425.8 MB)
          Interrupt:16 Base address:0xcc00

ham0      Link encap:Ethernet  HWaddr 00:ff:cb:59:46:25
          inet addr:5.217.20.154  Bcast:5.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1200  Metric:1
          RX packets:436 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1412 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:92667 (90.4 KB)  TX bytes:355745 (347.4 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1290 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1290 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:69088 (67.4 KB)  TX bytes:69088 (67.4 KB)

I can't 'curl' anything, because its no installed (& I can't install it because apt-get isn't working :-/) At this point I'm looking at just reinstalling that OS, we're looking at moving to OpenSolaris anyway.

share|improve this answer
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.