mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-13 15:13:33 +01:00
A longer delay may be needed after deploying a DNS-01 challenge #625
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @senarvi on GitHub (Oct 1, 2024).
I'm using Dehydrated to sign certificates for a DuckDNS domain. Recently Dehydrated stopped working. This is the error that I was seeing:
Turned out that the error was caused by a too short delay after deploying the challenge. The problem is explained here:
When you add a TXT record at your DNS provider, it takes some time before your DNS provider has copied that record to all of their servers. Sometimes this can take a minute, sometimes 10 minutes, occasionally longer, depending on the provider. If your ACME client submits a validation request before the TXT record for the DNS-01 challenge is ready at all your DNS provider’s servers, Let’s Encrypt may get an NXDOMAIN response, which will cause validation to fail. It depends on whether Let’s Encrypt happens to hit one of the servers that already has the TXT record or not. Now that we do multiple lookups, from multiple vantage points, it’s more likely that we’ll hit one of your DNS provider’s servers that hasn’t updated yet. Unfortunately, most DNS providers don’t provide an API that lets you check whether all servers are updated (Route53 is a notable exception). Your ACME client just needs to sleep a fairly generous amount of time between adding the TXT record and requesting validation.
I didn't find a way of controlling the delay after deploying the challenge. I solved the problem by adding a
sleepinhook.sh:@lukas2511 commented on GitHub (Oct 1, 2024):
This is intended behaviour. Dehydrated doesn't wait after the hook script returns. The hook script should check for propagation before returning control to dehydrated.
@senarvi commented on GitHub (Oct 1, 2024):
Ok, good. I wasn't sure where this should be fixed, but I thought that it's worth mentioning anyway, in case someone else is fighting with the same problem.
@jahir commented on GitHub (Oct 2, 2024):
I had the same issue with dedyn.io (powered by desec.io, seems to not allow new dedyn.io registrations, unfortunately), so I query their DNS servers until the token appears there. unfortunately, this was not enough (maybe due to load-balancing or anycast), so let it settle after that for another while. here's the snippet from my hook script:
DEDYN_NAME is the domain name (
yourhost.dedyn.io), LE_TOKEN is the LE token that is to be published (obviously). HTH.