{"action":"created","issue":{"url":"https://api.github.com/repos/ibmjstart/bluemix-letsencrypt/issues/3","repository_url":"https://api.github.com/repos/ibmjstart/bluemix-letsencrypt","labels_url":"https://api.github.com/repos/ibmjstart/bluemix-letsencrypt/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/ibmjstart/bluemix-letsencrypt/issues/3/comments","events_url":"https://api.github.com/repos/ibmjstart/bluemix-letsencrypt/issues/3/events","html_url":"https://github.com/ibmjstart/bluemix-letsencrypt/issues/3","id":187180629,"number":3,"title":"Unable to clean up challenge directory","user":{"login":"d0liver","id":6118197,"avatar_url":"https://avatars.githubusercontent.com/u/6118197?v=3","gravatar_id":"","url":"https://api.github.com/users/d0liver","html_url":"https://github.com/d0liver","followers_url":"https://api.github.com/users/d0liver/followers","following_url":"https://api.github.com/users/d0liver/following{/other_user}","gists_url":"https://api.github.com/users/d0liver/gists{/gist_id}","starred_url":"https://api.github.com/users/d0liver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d0liver/subscriptions","organizations_url":"https://api.github.com/users/d0liver/orgs","repos_url":"https://api.github.com/users/d0liver/repos","events_url":"https://api.github.com/users/d0liver/events{/privacy}","received_events_url":"https://api.github.com/users/d0liver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-03T20:26:58Z","updated_at":"2016-11-04T13:09:03Z","closed_at":null,"body":"I have been attempting to follow this guide: [Securing Custom Domains with Let's Encrypt](https://www.ibm.com/blogs/bluemix/2016/08/securing-custom-domains-lets-encrypt/)\r\n\r\nWhen running `python setup-app.py` after:\r\n1. Installing dependencies `pip install -r requirements.txt`\r\n2. 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.)\r\n3. Adding omegaunicorn.com to target org\r\n\r\nThe letsencrypt app (deployed successfully to Bluemix) times out waiting for certificates issuing the error:\r\n\"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.\"\r\n\r\nFollowing 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`\r\n\r\nFrom there a FailedChallenges error is raised. \r\n\r\nThe domains.yml file is as follows:\r\n\r\n`\r\n{\r\n  \"email\": \"david@doliver.org\",\r\n  \"staging\": false,\r\n  \"domains\": [\r\n    {\r\n      \"domain\": \"omegaunicorn.com\",\r\n      \"hosts\": [\r\n        \"www\",\r\n        \".\"\r\n      ]\r\n    }\r\n  ]\r\n}\r\n`\r\nI 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."},"comment":{"url":"https://api.github.com/repos/ibmjstart/bluemix-letsencrypt/issues/comments/258426352","html_url":"https://github.com/ibmjstart/bluemix-letsencrypt/issues/3#issuecomment-258426352","issue_url":"https://api.github.com/repos/ibmjstart/bluemix-letsencrypt/issues/3","id":258426352,"user":{"login":"lmsurpre","id":5478798,"avatar_url":"https://avatars.githubusercontent.com/u/5478798?v=3","gravatar_id":"","url":"https://api.github.com/users/lmsurpre","html_url":"https://github.com/lmsurpre","followers_url":"https://api.github.com/users/lmsurpre/followers","following_url":"https://api.github.com/users/lmsurpre/following{/other_user}","gists_url":"https://api.github.com/users/lmsurpre/gists{/gist_id}","starred_url":"https://api.github.com/users/lmsurpre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmsurpre/subscriptions","organizations_url":"https://api.github.com/users/lmsurpre/orgs","repos_url":"https://api.github.com/users/lmsurpre/repos","events_url":"https://api.github.com/users/lmsurpre/events{/privacy}","received_events_url":"https://api.github.com/users/lmsurpre/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T13:09:03Z","updated_at":"2016-11-04T13:09:03Z","body":"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.  \r\n\r\nWe'll get that fixed, but for now you can just swap the order of your hosts entries and it should work:\r\n\r\n`{ \"email\": \"david@doliver.org\", \"staging\": false, \"domains\": [ { \"domain\": \"omegaunicorn.com\", \"hosts\": [ \".\", \"www\" ] } ] }`"}}
{"actor":{"display_login":"lmsurpre"}}