SOLVED - Issue with Caddy Addon after cert expiration

Hey All-

I’ve been using the caddy addon for months with no issue, allowing it to issue my cert and manage my proxy. My certificate expired last week and I have not been able to renew. Here is my setup and the errors I am getting.

error:
starting version 3.2.4
2018/04/20 14:33:01 get directory at ‘https://acme-v01.api.letsencrypt.org/directory’: failed to get json “https://acme-v01.api.letsencrypt.org/directory”: Get https://acme-v01.api.letsencrypt.org/directory: dial tcp: lookup acme-v01.api.letsencrypt.org on 127.0.0.11:53: read udp 127.0.0.1:47664->127.0.0.11:53: i/o timeout
Activating privacy features…

My caddy configuration - which has not changed in months:

{
  "homeassistant": "ha.myredacteddomain.com",
  "vhosts": [
    {
      "vhost": "red.myredacteddomain.com",
      "port": "1880"
    }
  ],
  "raw_config": [],
  "email": "[email protected]"
}

I have both 80 → 80 and 443 → 443 set in the caddy configuration page. My hass config is just set to the localip port 8123 (also not changed). Both 80 and 443 are being forwarded off my router with both TCP and UDP.

I did try to enable the letEncrypt plugin to see if that would work and got a similar error that it couldn’t reach the let’s encrypt site. I am able to curl from the hass host, from the homeassistant container and if I start the caddy container manually with bash, I can ping acme-v01.api.letsencrypt.org (no cURL installed in that container).

Running hass.io on ubuntu. .67.1 - though the issue first occurred prior to the update from .66.1. I have gone as far as restoring from snaphots (both full configuration and just the caddy addon, completely removing the caddy containers and images and data directories from docker and reinstalling. At this point, I am just stuck.

Anyone have any insight?

Thanks!

BTW, I can access hass.io internally at ip:8123. Just get no routing from my .com domains.

Solved!!! For anyone having an issue, apparently while I could hit the letsencrypt url from my host or docker containers, the docker services could not. Adding google dns to resolveconf (which I had to install via apt-get install resolveconf) solved the issue.

This is the article that helped configure for me.

Setting DNS on Ubuntu

Had the same issue running Hass.io on an Ubuntu VM.

get directory at ‘https://acme-v02.api.letsencrypt.org/directory’: failed to get json “https://acme-v02.api.letsencrypt.org/directory”: Get https://acme-v02.api.letsencrypt.org/directory: dial tcp: lookup acme-v02.api.letsencrypt.org on 127.0.0.11:53: read udp 127.0.0.1:51081->127.0.0.11:53: i/o timeout Activating privacy features…

I used the cloudflare dns, and my history looks like this:

sudo apt-get install resolvconf
sudo echo "nameserver 1.1.1.1" >> /etc/resolvconf/resolv.conf.d/head
sudo echo "nameserver 1.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
sudo resolvconf --enable updates
sudo resolvconf -u

This seems suspiciously similar to the Docker DNS issues that occur on Docker for Windows as well.