Support » Fixing WordPress » cURL error 6: Could not resolve host

  • I’ve been using WordPress on dedicated, shared and VPS hosting for a few years. Today I’m experiencing something completely new. Many of my sites are failing on plugin updates, and they cannot connect to JetPack.

    Example plugin fail message:

    Update Failed: Download failed. cURL error 6: Could not resolve host: s3.amazonaws.com

    Here’s the thing: these sites are on both a VPS at Linode and a dedicated server at a completely separate provider. Both servers are Ubuntu 16.04 LTS. Here’s what I’ve done:

    1) Verified from the command line on the servers that I could indeed connect to the plugin sites.

    2) Changed to the 2017 theme and disabled all plugins.

    3) Refreshed permalinks.

    4) Temporarily stopped the UFW firewall.

    Man… I’m out of options. This is crazy weird. I have another VPS at Linode running Debian 8 and those sites are fine.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    Likely it’s an issue with your host. — perhaps an old version of curl or the openSSL libraries.

    Please try contacting your hosting provider

    Hey bud, I had this same issue and just fixed it. Also on Linode, running Ubuntu.

    It looks like its a DNS issue. I guess theLinode’s in-house DNS servers are having an issue? Its out of my depth, to be honest. You can get running again by using a public DNS instead (e.g., Google’s).

    You can confirm you have a DNS issue by running this test script:

    http://stackoverflow.com/a/1341688

    If indeed this is a DNS issue, you should get a similar error as you’re seeing from WordPress (curl error 6, can’t resolve hostname).

    To fix, login via SSH and edit /etc/resolv.conf:

    nano /etc/resolv.conf

    Comment out the existing nameserver lines (add a # to the front), and add in Google’s DNS servers instead.

    Here’s how my /etc/resolv.conf file looks now:

    nameserver 8.8.8.8
    nameserver 8.8.4.4
    #nameserver 196.126.127.5
    #nameserver 196.158.107.5
    #nameserver 196.158.111.5

    There could be other lines in the file (there are in mine) – just leave them alone.

    Restart apache (or nginx) after making the change:

    service apache2 restart

    That should do it!

    I hope this helps you. We’ve been trying to figure this out all day.

    Cheers,
    George

    Hi,

    It is a bug related to ubuntu auto-updating its libc-bin package.

    read more here:
    https://bugs.php.net/bug.php?id=74287

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘cURL error 6: Could not resolve host’ is closed to new replies.