after fixing our _acme records to be able to generate fly.io certs on one of our apps/domains that are routed through Cloudflare, the certificate is not being issued (has been almost an hour since the cert was added to the app, but hasn’t been issued yet). I’ve tried deleting and recreating the certificate to no avail.
Let’s Encrypt does a check from multiple vantage points, I just looked at your _acme-challenge. record and it seems to be cached to an old value in some locations?
Did you previously set the _acme-challenge. record to a TXT with a long-ish TTL? It might still be cached in some Let’s Encrypt check locations. At least I’m seeing it cached in a few locations such as Amsterdam.
DNS world propagation is pretty complex and sometimes fragile. In this case, I consistently see a TXT record value starting with YJH5V3A9PUQ1YB4jEuI_ in Amsterdam in various tests I’m doing. I believe Let’s Encrypt tests for a valid DNS record in Amsterdam. Unfortunately their error messages are sometimes unclear, all we know is that the TXT record is wrong in one of their testing location.
The only solution right now might be to wait a little bit.
@jakob.murko Just checked again and now some locations show a different TXT record value than the one I saw earlier? This is weird. The same locations that had issues now show a TXT record value starting with: 2akz85RxQbVNo1w-
Yeah, that’s weird. Btw, I see the same problem on our other hostname/instance (weird TXT records on the Amsterdam and Yekaterinburg servers on the site you linked). I’m not sure why that could be happening…if it doesn’t resolve I might have to also contact Cloudflare? Btw, I think the issuance might succeed if I temporarily bypass Cloudflare’s proxy for the hostname (“grey cloud” instead of “orange cloud”)?
I didn’t mean the acme CNAME/TXT records (I added both in a effort to resolve the situation), but the actual A and AAAA records for the actual domain. Also, when running dig I get good results for the TXT and CNAME entries. Can you provide more insight into what error letsencrypt is returning when trying to generate the cert?
The AAAA is the only one used for generating certificates. It uses the Let’s Encrypt ALPN verification challenge.
So you did the DNS verification flow to try and resolve the issue initially?
All we get is:
Incorrect TXT record "x" found at _acme-challenge.your.hostname
Looking at it again and it seems like you have the wrong thing setup. It used to be setup right but now the TXT record is completely wrong. It seems like you’ve set the TXT record to the value we need as a CNAME, not as a TXT.
You need a CNAME _acme-challenge.your.hostname. pointing to your.hostname.xyz.flydns.net., but it looks like you have a TXT with the value of your.hostname.xyz.flydns.net.. If you have both, you need to remove the TXT. I remember this worked earlier Today where a TXT query returned the correct value, recursively fetched from the provided CNAME.
Ah, yes I had both records set, CNAME and TXT. I have now removed the TXT…let’s see what happens?
Now I get the problem, though - the CNAME is pointing to flydns which actually returns the proper challenge response. Meanwhile, since I was setting the TXT record directly, instead of setting the secret I was setting the flydns hostname that was supposed to return the secret as the actual secret itself. And that makes more sense maybe why the results were mixed with the DNS queries (some were being resolved via CNAME and some via TXT directly)?
Looks like only the AMS and Yekaterinburg DNS servers are actually RFC compliant, since RFC1034 states: If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.