schubergphilis / chef-acme

Chef cookbook to request SSL certificates at Let's Encrypt
Apache License 2.0
112 stars 74 forks source link

Validation failure/increase logging #59

Closed ghost closed 7 years ago

ghost commented 7 years ago

Is it possible to increase the logging in some way as I keep getting Validation failures but with little info as to what is the cause:

       ================================================================================
       Error executing action `create` on resource 'acme_certificate[test.xxx]'
       ================================================================================

       RuntimeError
       ------------
       [test.xxx] Validation failed for domain test.xxx

       Cookbook Trace:
       ---------------
       /tmp/kitchen/cache/cookbooks/acme/providers/certificate.rb:85:in `block (2 levels) in class_from_file'
       /tmp/kitchen/cache/cookbooks/acme/providers/certificate.rb:53:in `map'
       /tmp/kitchen/cache/cookbooks/acme/providers/certificate.rb:53:in `block in class_from_file'
taj commented 7 years ago

Having the same issue here. is it possible to get more info on this issue please?

thoutenbos commented 7 years ago

It's meaning is that the ACME validation server is unable to download the token file from your website. So either your webserver has problems, or the folder where the tokens are placed it not served on the correct URL etc. Try with a browser if you can request it or not.

taj commented 7 years ago

Sorry I'm new to this sort of things. Do you mean that the .well-known folder must be visible under 'mydomain.com/.well-know/asd123'?

thoutenbos commented 7 years ago

For validation the cookbook will get a token from the validation server and place it in a file, this file must be exposed via your webserver, where the validation server will request it to confirm that it matches. This is the proof of ownership of your domain.

The path where the token should be exposed is: mydomain.com/.well-known/acme-challenge/[token]

taj commented 7 years ago

thank you for you help @thoutenbos ! I got it to work now!