-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues creating certificates for subdomain with route53 #1008
Comments
It's happening to me as well with |
After some debugging, it looks to me that what is happening is:
|
So to me this is not a Route53 provider failure, this is a |
If you have an intermittent timeout, I think you should check your network and its configuration, and the nameservers that you are using. |
You can also simply configure the DNS timeout.
|
it does not look to be a timeout issue, it is only when the host name is on a subdomain, I am updating certificates on both sides of the failures for the main domain and it is only the lego client that fails, I have no issues when using https://github.com/acmesh-official/acme.sh |
Sure, but that doesn't remove the fact that Here is a screenshot where one of those failure happen: In that case, the node being currently checked will be silently dropped and the function can return an incorrect result, that will cascade later in a bigger problem (complete failure of the certificate issuance). |
@armsby I got the exact same error message as you, that's even how I found this issue. The root cause might be something else than a timeout but if an error happen when doing a DNS query, you can eventually end up with this final error. |
@MichaelMure so your problem is a timeout so you can use change the client.Challenge.SetDNS01Provider(provider,dns01.AddDNSTimeout(30*time.Second)) or
|
I understand that but that's only a band-aid on this problem. Networking is unreliable by nature, especially UDP. A DNS request can fail for different reasons and the code doing those requests should handle those errors properly if possible. |
For me, the best way to handle timeout error is to configure |
What if the UDP packet simply get lost or dropped somewhere on an unreliable connection? No amount of timeout will fix that and it will still show up as a timeout X minutes later. |
lego/challenge/dns01/nameserver.go Lines 255 to 266 in 1a82eff
lego/challenge/dns01/nameserver.go Lines 259 to 263 in 1a82eff
|
Note: I certainly don't want to start an argument and as a free software maintainer myself I know that sometimes people get ... inconsiderate. But we should be able to agree on how the code behave. |
My understanding of the code section you linked is that a TCP DNS query will be done as a fallback if the UDP reply is too big. But that implies having a valid UDP response so that doesn't handle a packet loss. edit: this happen when the reply is > 512bits: https://serverfault.com/questions/587625/why-dns-through-udp-has-a-512-bytes-limit |
Yes if not a fallback (I know the Truncated meaning) but it's not a simple DNS call. Otherwise, create a fix without any information to reproduce the issue and create a blind fix seems to me not a good way to follow. |
Ha I see. Well, I do not know why this particular DNS query fail so often for me, I have an otherwise reliable internet connection. Maybe it's because the certificates I'm trying to generate have a lot of nodes (it's in the form of In any case, the
To me it implies that the possible failure is left to the caller to handle. |
I can of course test whatever solution you come up with and see if that fix the problem. |
I will trying to create a retry system. |
Thank you :) |
@MichaelMure could you try #1180 ? |
I'll give it a try tomorrow. That looks like a good solution. |
I'm working from home today and I just don't get any timeout from there. I'll try again from this other place that apparently have less than optimal networking. |
I have been trying to create a certificate using letsencrypt and route53 the certificate im trying to create is for 'server.sub.domain.com' when trying to use route53 it I get an error saying that it can not find the host zone id for sub.domain.com, I belive that is a bug as the domain it should be looking for is domain.com, and that does exist, there is no issues creating certificates for that domain.
I have also tested it with cloudflare for another domain and that works perfectly, so I belive that the problem is when the api call towards route53
The text was updated successfully, but these errors were encountered: