The root of the problem here is that you are looking for a bug in Let's Encrypts http domain validation, but you need to look for a bug in your own http response. The chance of it being a bug in Let's Encrypt is not zero, but the chance of it being a bug in your config is 99.999% or thereabouts.
LE will resolve your domain to a set of IPs and it will try some of them as http, with a preference for IPv6. It will do this from multiple geographic locations. If any of those IPs that it tries then respond with a redirect then it will follow them. If on the other hand the IP it tried blocks http on TCP port 80 that's where it will stop (and you'll get nothing in your nginx log).
Own the problem and commit to the idea that it's your own config that's getting in the way, you'll get this fixed.
@jean-christophe-manc I ran a test that reproduces your failed validation exactly. Even to include the IPv4 address wrongly shown with HTTPS (that is a known bug as I said).
And, the situation is exactly as I described earlier:
I have both A and AAAA record for domain
IPv6 inbound to my server is blocked by firewall rule
My nginx redirects HTTP to HTTPS for all requests (even acme challenge)
This results in the same sequence in the Validation Record as I described most recently in post #21 :
LE tried HTTP to IPv6 but times out (in this test b/c of firewall)
LE retries HTTP to IPv4 and gets redirected to HTTPS
LE follows redirect using IPv6 and times out again
It does not retry IPv4 after redirect so challenge fails.
You really need to study your infrastructure. And, you need to get away from thinking that LE sends multiple simultaneous HTTP requests to each IP address. It does not. An HTTP Challenge is a sequential series of http(s) requests.
With this in mind, you still have not explained how you plan to have both of your IPv6 addresses reply correctly. LE may choose either one. And, each must be able to reply correctly. Which may involve a carefully crafted redirect. But still must result in a satisfied challenge.
Hence my earlier question "Could you give me the IPv6/IPv4 addresses of the server(s) validating the challenge?" Even a range would have been helpful to rule this out or not.
Mine did not.
That could not have happened in my case.
I know mine perfectly. Do you know where LE challenge servers are located? Do they answer in the same region/country as the challenge source?
When/where did I write that?
I have already answered that. Please read my answers carefully.
As a conclusion, considering that there was no http --> https redirect on my side, and that all my IPv6/IPv4 addresses were operational (except for the first test), we can state that the cause of that issue comes from either:
LE IPv6 and IPv4 addresses blocked by my firewalll which is unlikely if LE challenge servers answer in the same region/country as mine
or an unidentified issue on LE side
I know that because I have already successfully validated an LE challenge for the same server FQDN a few months back with the same challenge type http-01... with the exact same workflow on my side as the one that was used to trigger the current issue:
This is for the best. The HTTP-01 challenge is already proven to be incompatible with your preferred strict firewall policy. The link below goes to the relevant FAQ topic on the IP addresses used for validation.
I just want to note that I have received an HTTPS redirect for all the http urls listed above.
Whenever debugging this sort of stuff, i like to use curl -I and I will try from my local machine, then confirm the same behavior with a few different cloud/remote server accounts I have. The reason for this is that there are sometimes geographic routing issues or networking/firewall rules that someone in place.