Replies: 1 comment 6 replies
-
You should use |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Welcome
What did you expect to see?
Check the delegated nameserver instead of the "main" nameserver during the DNS record propagation check step. (#1597 similar issue?)
Details: Assume I own
example.com
and wait to obtain a certificate fortest.i.example.com
. Due to security concerns around API access, I delegatedi.example.com
from provider A to Cloudflare by creating NS records fori.example.com
. I tried to obtain a certificate fortest.i.example.com
via the dns-01 challenge using the commandlego --dns cloudflare --domains "test.i.example.com" --email [email protected] --dns.resolvers 1.1.1.1:53 run
. However,lego
stuck at "acme: Waiting for DNS record propagation." and timed out 2 minutes later, reporting that it could not find the TXT record for_acme-challenge.test.i.example.com
on the nameserver from provider A. The same error is observed when using NixOS'ssecurity.acme
setting instead of lego cli.Update 1: Tried the latest Docker image, same error.
Update 2: Tried
--dns.propagation-disable-ans=true
but consistently got the error of "invalid authorization: acme: error: 400 :: urn:ietf:params:acme:error:dns :: DNS problem: NXDOMAIN looking up TXT for _acme-challenge.test.i.example.com - check that a DNS record exists for this domain".With this option on, I didn't see any pause to wait for DNS propagation. So I suspect the ACME server checked the record before the update is propagated. That's why my current workaround is
--dns.propagation-wait 10s
.Debug effort: I tried
dig @1.1.1.1 _acme-challenge.test.i.example.com TXT
and it returned the correct result. I also triedcertbot
, which can successfully obtain the certificate.Current workaround: Use the
--dns.propagation-wait 10s
flag to skip the propagation check and hope that 10s is enough for propagation.What did you see instead?
Follow the NS records of
i.example.com
to retrieve DNS records from Cloudflare instead of provider A, and successfully obtain the certificate.How do you use lego?
Docker/Binary
Reproduction steps
example.com
on Cloudflare.i.example.com
to Cloudflare by adding correspondingNS
records.example.com
with theDNS:Edit
permission.lego
withlego --dns cloudflare --domains "test.i.example.com" --email [email protected] --dns.resolvers 1.1.1.1:53 run
.Effective version of lego
lego version 4.22.2 linux/amd64
Logs
(Sensitive information is removed or redacted.)
Go environment (if applicable)
N/A.
Beta Was this translation helpful? Give feedback.
All reactions