-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Challenge fails with Connection refused (challenge type http-01) #36
Comments
logandretry works as a workaround (after #35). The server won't start listening on the defined ports until the Configure method in the Startup class ends. This means that any code that does some form of lengthy initialization in the Configure method, will trigger this problem, because the LetsEncrypt challenge arrives before Configure ends. |
Latest versions (post #75) have a |
I think I may have time for this after the 15th. Sorry for that - super busy these days. |
As far as I know this was addressed in #37 |
I have been tracking down this problem. I have a seriously underpowered ATOM server where lots of problems like thread starvation, low memory situations, low cpu resource, etc. are found. This is part of edge testing.
I found that one of my Docker containers was unable to obtain a new cert even though this worked fine on a "normal" system (i.e., with enough resources).
The call to services.AddFluffySpoonLetsEncrypt will start the renewal process by calling RenewCertificateIfNeeded.
The call to app.UseFluffySpoonLetsEncrypt() will setup the letsencrypt challenge response handling.
Unfortunately, in my case due to the weak server, the LetsEncrypt challenge to my server arrives BEFORE the call to UseFluffySpoonLetsEncrypt is even made, so my server can't respond to the challenge, hence the "Connection refused" response.
The fact that the pipeline isn't ready (and can't be ready) when AddFluffySpoonLetsEncrypt is called and issues the renewal is a problem, at least in my scenario. It works fine on a reasonably well powered server, but with few available threads any server could (in theory) run into this problem.
I think AddFluffySpoonLetsEncrypt shouldn't issue the renewal, Instead, the renewal should be made in UseFluffySpoonLetsEncrypt. At this point enough of the pipeline is available to respond to the challenge.
I'll experiment with this and may submit a PR if I find a decent solution.
BTW, this problem caused me to find #35 when I tried retryandlog as a workaround :-)
The text was updated successfully, but these errors were encountered: