I'm trying the simple greenlock-express example and I've tried many many times but it won't work. I followed the tutorial many times. I created the greenlock.d/config.json file and it works because I see the domain on the output.
When I launch I see:
webhook_test | Listening on 0.0.0.0:80 for ACME challenges, and redirecting to HTTPS
webhook_test | Listening on 0.0.0.0:443 for secure traffic
webhook_test | Ready to Serve:
webhook_test | ewkhrwk.xyz
However when I access it with postman, I get
webhook_test | ACME Directory URL: https://acme-v02.api.letsencrypt.org/directory
webhook_test |
webhook_test | By using this software you ([email protected]) are agreeing to the following:
webhook_test | ACME Subscriber Agreement: https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
webhook_test | Greenlock/ACME.js Terms of Use: https://rootprojects.org/legal/#terms
webhook_test |
and it stays like that for minutes. Previously when I used greenlock months ago it'd simply generate the certificates in the first access.
After some minutes I get
webhook_test | Error cert_issue:
webhook_test | connect ETIMEDOUT 165.232.74.82:80
webhook_test | code: ETIMEDOUT
webhook_test | Error: connect ETIMEDOUT 165.232.74.82:80
webhook_test | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
webhook_test | Error cert_issue:
webhook_test | connect ETIMEDOUT 165.232.74.82:80
webhook_test | code: ETIMEDOUT
webhook_test | Error: connect ETIMEDOUT 165.232.74.82:80
webhook_test | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
webhook_test | Error cert_issue:
webhook_test | connect ETIMEDOUT 165.232.74.82:80
webhook_test | code: ETIMEDOUT
webhook_test | Error: connect ETIMEDOUT 165.232.74.82:80
webhook_test | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
webhook_test | set greenlockOptions.notify to override the default logger
I've encountered the exact same error when attempting to setup a project that uses greenlock. This is happening because apparently greenlock attempts to access http://example.com from the machine which sets up the certificate.
Accessing http://example.com from the internet would result in a reply which looked like this
However the request was timing out when attempting to access http://example.com from the machine on which I was trying to setup the certificate using greenlock. This was happening because of a network issue, accessing example.com from the internal network won't actually work. How I fixed it was by adding '127.0.0.1 example.com' in the /etc/hosts in order to resolve example.com to the localhost.