-
Notifications
You must be signed in to change notification settings - Fork 90
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
acme_certificate challenge completion (step 2) hangs #171
Comments
Such "hanging" usually happens if for some reason the ACME server ended up in an invalid state (though I don't believe that should happen for Let's Encrypt's implementation), or because there's a bug in the module (state handling) which lets it assume the server is still needing some time, while the server already indicated that the order completed or failed. Since Let's Encrypt doesn't require authentication for the order/challenge/authz URLs, I was able to look at what's the state of the above order is. Everything seems to be in a pending state, but I think I already know what the root cause for the problem is (the problem itself might still be a bug in the module): you seem to be using the So either remove the wildcard domain, or switch to the |
I think I also spotted the problem in the code. If you specify a challenge type that's not found for one of the challenges, it will not activate that challenge, but simply wait until the server indicates a status change for that challenge. Which will obviously not happen, since we didn't ask the server to check for it... (Well, eventually it will expire, but that might take a few days ;-) ) |
resolved_by_pr #173 |
Thanks @felixfontein! I've adapted my vars and SAN template and am testing it now. |
@felixfontein do I need to also generate a challenge file in |
Also @felixfontein if you have time, how did you check the status of that order? I haven't been able to find it on the letsencrypt site. I updated the SAN config with individual domains to cover rather than the wildcard, but it's still hanging -- I'm wondering if I have to wait for the request to time out? Or is there a way to force it to redo the whole process... |
@felixfontein apologies I found the order URI in the returned response. 🤦 |
@sivy you can search for
This shows the identifiers for which the certificate is, as well as the authorization URLs. If you curl these, say the second one, you get
(You can |
(If you're interested in what all these structures are, see https://tools.ietf.org/html/rfc8555 - see the sections Order Object, Authorization Objects, and Challenge Objects.) |
thank you for your patience 😁 |
@sivy you're welcome! I've just merged a PR which should prevent the hanging, and should also tell the user right in the first acme_certificate round that the challenge type chosen is not supported by all challenges posed by the CA. |
SUMMARY
I have a playbook I've built from the description here:
https://www.digitalocean.com/community/tutorials/how-to-acquire-a-let-s-encrypt-certificate-using-ansible-on-ubuntu-18-04
The final task, which is the
acme_certificate
challenge completion (step 2), hangs and never completes. Most of my playbook is like the one in the article. The final task is pasted below.ISSUE TYPE
COMPONENT NAME
acme_certificate
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
local: MacOS 11.0.1
remote: Centos8
STEPS TO REPRODUCE
The entire file: https://gist.github.com/sivy/f9120a8197100672f6c5b7824f95d4d0
EXPECTED RESULTS
I expected the challenge to complete and the keys being generated.
ACTUAL RESULTS
The last step hangs and does not complete. I have to Cntl-C to cancel the command.
The text was updated successfully, but these errors were encountered: