my dockerized Traefik installation used to run just fine, but recently, renewal of let's encrypt certificates fails:
traefik | time="2021-02-17T18:50:38Z" level=error msg="Error renewing certificate from LE: {traefik.host.de []}, error: one or more domains had a problem:\n[traefik.host.de] acme: error: 400 :: urn:ietf:params:acme:error:connection :: Connection refused, url: \n" providerName=le.acme
(from docker-compose logs)
What looks suspicious to me is the newline \n in the error message.
with enabling debug output I get
traefik | time="2021-02-17T19:50:13Z" level=debug msg="legolog: [INFO] Unable to deactivate the authorization: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/123"
traefik | time="2021-02-17T19:50:13Z" level=error msg="Unable to obtain ACME certificate for domains \"cloud.host.de\": unable to generate a certificate for the domains [cloud.host.de]: error: one or more domains had a problem:\n[cloud.host.de] acme: error: 400 :: urn:ietf:params:acme:error:connection :: Connection refused\n" providerName=le.acme routerName=nextcloud@docker rule="Host(`cloud.host.de`)"
traefik | time="2021-02-17T19:50:13Z" level=debug msg="legolog: [INFO] Unable to deactivate the authorization: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/123"
(changed to the staging server and removed the letsencrypt directory to force generating new certificates)
Just the basic question before moving deeper with debugging - can you please make sure that your host is reachable and the port 443 is not being blocked?
Hi,
I would just join the thread here, because my fresh docker-based installation has the exact same problems.
Configurations seem to be quite identical. My port is reachable.
The certificate generation using the http-challenge works out of the box. I can reach all of my hosts using https but using the TLS challenge would be great. Debug output is the same as above.
I can post my simple setup later but seems to be quite similar to @Horus config.
So I just played around and maybe I found something.
I removed my AAAA DNS record and the tlsChallenge worked again. I am afraid, that there is some issue with my IPv6 configuration. As a matter of fact I didn't config anything with IPv6 which probably means, that Let'sEncrypt just tries to connect to my v6 address and my server does not respond properly.
Is there anything, I need to keep In mind, using IPv6? Do I need to configure my Docker-installation somehow or tell traefik to respond to v6-requests? I defined my addresses in the traefik.toml as follows
Edit /etc/docker/daemon.json , set the ipv6 key to true and the fixed-cidr-v6 key to your IPv6 subnet. In this example we are setting it to 2001:db8:1::/64 .