Skip to content
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

Unable to clean up challenge directory #3

Closed
d0liver opened this issue Nov 3, 2016 · 3 comments
Closed

Unable to clean up challenge directory #3

d0liver opened this issue Nov 3, 2016 · 3 comments

Comments

@d0liver
Copy link

d0liver commented Nov 3, 2016

I have been attempting to follow this guide: Securing Custom Domains with Let's Encrypt

When running python setup-app.py after:

  1. Installing dependencies pip install -r requirements.txt
  2. Configuring DNS (The guide suggests using CNAME to the Bluemix route but DreamHost seems to have issues doing url forwarding on unhosted domain names so forwarding omegaunicorn.com to www.omegaunicorn.com wasn't working and DreamHost wouldn't accept a CNAME for something other than a subdomain. Therefore, instead I did an nslookup on my deployed application on Bluemix and added A records for omegaunicorn.com and www.omegaunicorn.com using that ip to DreamHost. This seems to be fine.)
  3. Adding omegaunicorn.com to target org

The letsencrypt app (deployed successfully to Bluemix) times out waiting for certificates issuing the error:
"It has been 1 minutes without seeing certificates issued in the log. Something probably went wrong. Please check the output of cf logs letsencrypt --recent for more information."

Following the advice, I check the output of cf logs letsencrypt --recent and the logs report Unable to clean up challenge directory /home/vcap/app/host/.well-known/acme-challenge

From there a FailedChallenges error is raised.

The domains.yml file is as follows:

{ "email": "david@doliver.org", "staging": false, "domains": [ { "domain": "omegaunicorn.com", "hosts": [ "www", "." ] } ] }
I tracked the error down in the certbot source code also and all it's supposed to be doing is this: os.rmdir(root_path) so I guess there is some kind of permissions issue within the deployed letsencrypt app or maybe the folder wasn't created? I am able to visit the site with the existing DNS/Bluemix configuration so I assume that there is some issue with my domains.yml configuration or I have uncovered an error with this or some other source that this depends on.

@lmsurpre
Copy link
Member

lmsurpre commented Nov 4, 2016

Thanks for the detailed report. This is definitely our bad. I think that everything is working and we're just checking in the wrong spot for confirmation of the certificates.

We'll get that fixed, but for now you can just swap the order of your hosts entries and it should work:

{ "email": "david@doliver.org", "staging": false, "domains": [ { "domain": "omegaunicorn.com", "hosts": [ ".", "www" ] } ] }

@d0liver
Copy link
Author

d0liver commented Nov 5, 2016

Everything's working now. Thanks!

@lmsurpre
Copy link
Member

lmsurpre commented Jan 25, 2017

'Unable to clean up challenge directory' should be fixed with commit 0dea2de

However, I don't think we ever fixed the script to work with a '.' hostname that isn't in the first position.

@lmsurpre lmsurpre reopened this Jan 25, 2017
gokulk04 added a commit that referenced this issue Jan 26, 2017
Solution for Issue#3: replaced primary_domain var in get_cert function with domain_with_first_host var, which has host name prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants