oax9c
By:
oax9c

Can't apt-get update, "temporary failure resolving mirrors.digitalocean.com".

July 14, 2017 806 views
DigitalOcean DNS Debian

Hey, I'm using a newly rebuilt Debian 9 image and I can't successfully execute apt-get update. I've seen several similar questions asked here, none helped me. I can ping to google.com or other websites, even mirrors.digitalocean.com; 8.8.8.8 is present in my /etc/resolv.conf, but still, right after having rebuilt the droplet, ssh-ed into it and changed the root password, the command doesn't work.

Here's the exact error message I get:

root@whatever:~# apt-get update
Err:1 http://mirrors.digitalocean.com/debian stretch InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:2 http://mirrors.digitalocean.com/debian stretch/updates InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Err:3 http://mirrors.digitalocean.com/debian stretch-updates InRelease
  Temporary failure resolving 'mirrors.digitalocean.com'
Reading package lists... Done
W: Failed to fetch http://mirrors.digitalocean.com/debian/dists/stretch/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://mirrors.digitalocean.com/debian/dists/stretch/updates/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Failed to fetch http://mirrors.digitalocean.com/debian/dists/stretch-updates/InRelease  Temporary failure resolving 'mirrors.digitalocean.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

3 Answers

Hi @oax9c

I'm not seeing a problem right now. Could you try again?
I'm trying from servers in NYC1, NYC3, FRA1 and AMS2, and all resolves correctly.
I have seen this one time before, but several months ago - I couldn't connect for 10min.

  • I'm in FRA1 and still getting the error. Perhaps I'll wait until tomorrow to see if anything changes...

    • @oax9c What do you get if you run this:

      dig mirrors.digitalocean.com A +short && dig mirrors.digitalocean.com AAAA +short
      

      I get the following from FRA1 (note that your order might differ):

      198.199.99.226
      192.241.164.26
      95.85.0.50
      103.253.144.50
      2400:6180:0:1::10
      2604:a880:0:1::4
      2604:a880:1:1::4
      2a03:b0c0:0:1::4
      

      EDIT:
      And I'm using these DNS servers on that server:

      nameserver 2001:4860:4860::8844
      nameserver 2001:4860:4860::8888
      nameserver 8.8.8.8
      
      • I can't execute this command since I cannot install any package; however trying this with Ubuntu 17.04 gave me these addresses, although in a different order.

        I also tried to apt-get update and install zsh in Ubuntu, it failed because of 404 errors...

i have same problem too... ping http://mirrors.digitalocean.com/debian/ Name or service not known, but ping google.com is working.... i think digitalocean droplet can not access himself files...

Also seeing this issue with a fresh install from Debian 9. Rebuilding with Debian 8 works just fine (even after upgrading it to 9!).

Have another answer? Share your knowledge.