Getting error when starting Let's Encrypt

I installed Hassio on a VM using

curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s

And then I installed the Let’s Encrypt add on.

{
  "email": "[email protected]",
  "domains": [
    "example.com",
    "mqtt.example.com",
    "hassio.example.com"
  ],
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

When I hit start, I get the following at the bottom of the addon screen:

starting version 3.2.4
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
An unexpected error occurred:
ConnectionError: HTTPSConnectionPool(host=‘acme-v01.api.letsencrypt.org’, port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x7f36a47a5590>: Failed to establish a new connection: [Errno -3] Try again’,))
Please see the logfiles in /var/log/letsencrypt for more details.

What am I doing wrong? (btw, i used Configurator to browse to /var/log and it’s emtpy)

You did nothing wrong.
I just had the same issue after installing hassio on ubuntu 18.04.

It is just a DNS issue between docker and ubuntu’s resolve daemon.
Give docker a specific DNS and the containers will be happy again

See also here:

In my case I did not use Google’s DNS servers. Instead, I used the IP of my router.