this post REALLY helped:
"Failed to connect to xxx for TLS-SNI-01"
I was fighting with this for hours....
I had a cert for an existing site; had removed it, but was always getting the above error.
First: double check you have not limited access!!!! I had only allowed access from some known IPs - of course, this gave this error!
But after fixing that, still the same error.....
Anyway, the above post sorted it (but then had to set the certs manually in the apache conf file - i.e. un-comment the ones already there and change host names.)
hope this helps someone.
s
Please fill out the fields below so we can help you better.
My domain is: not important
I ran this command:letsencrypt --apache
It produced this output: Failed to connect to xxx for TLS-SNI-01
My operating system is (include version): Ubuntu 16?
My web server is (include version): apache2
My hosting provider, if applicable, is:laptop
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):no