I try to get a wildcard certificate using the Let's Encrypt DNS challenge.
Unfortunately i always get the error: traefik2 | time="2020-07-11T09:20:09Z" level=error msg="Unable to obtain ACME certificate for domains \"nuc.cmos.at,*.nuc.cmos.at\" : cannot get ACME client unrecognized DNS provider: hetzner" providerName=myresolver.acme
Could you please post your configs. Right under the dnsChallenge there is a purple line saying "Configuring a dnsChallenge with the DigitalOcean Provider". If you click on it, you will see an example of what your configuration should approximately look like.
The problem is with your DNS setup. lego cannot find authoritative nameservers for your zone. Try it with dig or nslookup and you won't be able either.
For testing I moved from the sub domain to the normal domain cmos.at
I expected the authoritative name server is defined by the SOA Record.
Zone File:
; SOA Records
@ IN SOA hydrogen.ns.hetzner.com. dns.hetzner.com. 2020071121 86400 10800 3600000 3600
The dig response also looks Ok (containing the frag aa)
% dig @hydrogen.ns.hetzner.com whoami.cmos.at :(
; <<>> DiG 9.11.5-P4-5.1+deb10u1-Debian <<>> @hydrogen.ns.hetzner.com whoami.cmos.at
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15034
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;whoami.cmos.at. IN A
;; ANSWER SECTION:
whoami.cmos.at. 60 IN A 116.202.181.57
;; Query time: 30 msec
;; SERVER: 213.133.100.98#53(213.133.100.98)
;; WHEN: Sat Jul 11 15:19:08 CEST 2020
;; MSG SIZE rcvd: 59
But still I get the Error:
traefik2 | time="2020-07-11T12:30:47Z" level=error msg="Unable to obtain ACME certificate for domains \"cmos.at,*.cmos.at\" : unable to generate a certificate for the domains [cmos.at *.cmos.at]: error: one or more domains had a problem:\n[*.cmos.at] time limit exceeded: last error: could not determine authoritative nameservers\n[cmos.at] time limit exceeded: last error: could not determine authoritative nameservers\n" providerName=myresolver.acme
Yep, you need to get to the bottom of this. Traefik really cannot figure it out if the dns setup is wrong. Perhaps you can contact hetzner support.
Your whoami.cmos.at domain is located in cmos.at zone, but dig cmos.at NS does not return any nameservers. Lego expects to get them, as it needs them for subsequent DNS queries.
I found one issue with the DNS (Propagation with the hetzner server center).
Therefore I now manually configured the resolver.
If I use "dig _acme-challenge.cmos.at TXT" in the contain I also get the correct TXT Records.
Nevertheless the log says "Waiting for DNS record propagation.".
I know we are now more in LEGO than in Traefik.
But is there a way to get an even more detailed log where it is visible why the program is waiting.
time="2020-07-11T16:16:02Z" level=debug msg="legolog: [INFO] [*.cmos.at] acme: Trying to solve DNS-01"
time="2020-07-11T16:16:02Z" level=debug msg="legolog: [INFO] [*.cmos.at] acme: Checking DNS record propagation using [hydrogen.ns.hetzner.com:53]"
time="2020-07-11T16:16:04Z" level=debug msg="legolog: [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]"
time="2020-07-11T16:16:04Z" level=debug msg="legolog: [INFO] [*.cmos.at] acme: Waiting for DNS record propagation."
time="2020-07-11T16:16:06Z" level=debug msg="legolog: [INFO] [*.cmos.at] acme: Waiting for DNS record propagation."
...
time="2020-07-11T16:18:04Z" level=debug msg="legolog: [INFO] [*.cmos.at] acme: Waiting for DNS record propagation."
time="2020-07-11T16:18:06Z" level=debug msg="legolog: [INFO] [cmos.at] acme: Trying to solve DNS-01"
time="2020-07-11T16:18:06Z" level=debug msg="legolog: [INFO] [cmos.at] acme: Checking DNS record propagation using [hydrogen.ns.hetzner.com:53]"
time="2020-07-11T16:18:08Z" level=debug msg="legolog: [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]"
time="2020-07-11T16:18:08Z" level=debug msg="legolog: [INFO] [cmos.at] acme: Waiting for DNS record propagation."
time="2020-07-11T16:18:10Z" level=debug msg="legolog: [INFO] [cmos.at] acme: Waiting for DNS record propagation."
t...
time="2020-07-11T16:20:05Z" level=debug msg="legolog: [INFO] [cmos.at] acme: Waiting for DNS record propagation."
time="2020-07-11T16:20:07Z" level=debug msg="legolog: [INFO] [cmos.at] acme: Waiting for DNS record propagation."
time="2020-07-11T16:20:09Z" level=debug msg="legolog: [INFO] [*.cmos.at] acme: Cleaning DNS-01 challenge"
time="2020-07-11T16:20:15Z" level=debug msg="legolog: [INFO] [cmos.at] acme: Cleaning DNS-01 challenge"
time="2020-07-11T16:20:21Z" level=debug msg="legolog: [INFO] Deactivating auth: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/75836619"
time="2020-07-11T16:20:22Z" level=debug msg="legolog: [INFO] Deactivating auth: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/75836620"
time="2020-07-11T16:20:22Z" level=error msg="Unable to obtain ACME certificate for domains \"cmos.at,*.cmos.at\" : unable to generate a certificate for the domains [cmos.at *.cmos.at]: error: one or more domains had a problem:\n[*.cmos.at] time limit exceeded: last error: read udp 192.168.64.2:49075->116.203.132.207:53: read: connection refused\n[cmos.at] time limit exceeded: last error: read udp 192.168.64.2:52349->116.203.132.207:53: read: connection refused\n" providerName=myresolver.acme
With some support of a friend I now got it Running.
As suggested by zesprl the issue was in the the NS records.
I forgot the "." at the end of the domain name resulting in an incorrect response.
And probably I needed more than one NS record.
Thanks zesprl for pointing me in the right direction