Report this

What is the reason for this report?

How to fix the March 2017 Ubuntu DNS resolution issues

Posted on March 22, 2017

As of March 20th, many Ubuntu users across the web were suddenly having DNS resolution issues pop up in their applications due to a bad update pushed out by Canonical (the maintainers of Ubuntu) which breaks DNS resolution after a few hours of uptime. Here’s the bug report where the issue was reported and triaged:

https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1674532

This may have resulted in failures of your CMS to update/install plugins/install themes, failures to connect to external APIs, and/or error messages similar to the following:

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname
Could not resolve host: downloads.wordpress.org
cURL error 6: Could not resolve host: example.com in....

Fortunately Canonical has since been able to resolve the issue, but affected systems must update to acquire the fix. To do that, you’ll need DNS working, so if it’s currently down please first reboot your Droplet. Once DNS resolution is working as normal, please run:

sudo apt-get update
sudo apt-get upgrade

Then you can check your versions to ensure you’ve got the right ones. This can be done with:

sudo dpkg -l | grep "GNU C Library" | awk '{print $3}'

If you’re on Ubuntu 16.X, you should see output similar to the following:

# sudo dpkg -l | grep "GNU C Library" | awk '{print $3}'
2.23-0ubuntu7
2.23-0ubuntu7
2.23-0ubuntu7

If you’re on Ubuntu 14.X, you should see output similar to the following:

# sudo dpkg -l | grep "GNU C Library" | awk '{print $3}'
2.19-0ubuntu6.11
2.19-0ubuntu6.11

If you’re on Ubuntu 12.X, you should see output similar to the following:

# sudo dpkg -l | grep "GNU C Library" | awk '{print $3}'
2.15-0ubuntu10.17
2.15-0ubuntu10.17

If you see older versions of those packages, you’ll need to upgrade per the previous instructions to avoid this issue.

If you have further questions, please don’t hesitate to comment below or open a ticket! We’re happy to help :)

Regards, Darian Platform Support Advocate



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I didn’t realise that automatic updates were on that could break my server like this. How do I turn these updates off for 16.04??

I performed the procedure, but the problem is still occurring.

CURL error 28: Resolving timed out after 10521 milliseconds

My droplet is on the NYC1 server running a WordPress 4.7 on 16.04 image.

I had to edit the /etc/resolve.conf file to add name servers as recommended above.

That gave me the opportunity to upgrade Ubuntu. As suggested above, I am seeing the proper results.

sudo dpkg -l | grep “GNU C Library” | awk ‘{print $3}’ 2.23-0ubuntu7 2.23-0ubuntu7 2.23-0ubuntu7 2.23-0ubuntu7 2.23-0ubuntu7

Unfortunately, after a few hours the problem returns. Is there a fix for this situation?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.