I keep receiving this error every time I try to renew a certificate for the last week:
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Renewing an existing certificate
Attempting to renew cert (themud.org) from /etc/letsencrypt/renewal/themud.org.conf produced an unexpected error: HTTPSConnectionPool(host='acme-v01.api.letsencrypt.org', port=443): Read timed out. (read timeout=45). Skipping.
Checked to see if I can connect to the server and I can, I made sure my website is publicly accessible and it is, rebooted webserver, router and dns server just in case still won't renew.
This looks like an error from Certbot failing to reach Let's Encrypt's ACME server at acme-v01.api.letsencrypt.org. Are you able to share a traceroute/mtr to that address? Does openssl s_client -connect acme-v01.api.letsencrypt.org:443 </dev/null succeed for you?
many moons ago I worked on an LPC intermud2 implementation. Glad to see there's still MUDs out there
openssl s_client -connect acme-v01.api.letsencrypt.org:443 </dev/null
CONNECTED(00000003)
depth=3 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=2 C = US, O = IdenTrust, CN = IdenTrust Commercial Root CA 1
verify return:1
depth=1 C = US, O = IdenTrust, OU = TrustID Server, CN = TrustID Server CA A52
verify return:1
depth=0 CN = *.api.letsencrypt.org, O = INTERNET SECURITY RESEARCH GROUP, L = Mountain View, ST = California, C = US
verify return:1
Certificate chain
0 s:/CN=*.api.letsencrypt.org/O=INTERNET SECURITY RESEARCH GROUP/L=Mountain View/ST=California/C=US
i:/C=US/O=IdenTrust/OU=TrustID Server/CN=TrustID Server CA A52
1 s:/C=US/O=IdenTrust/OU=TrustID Server/CN=TrustID Server CA A52
i:/C=US/O=IdenTrust/CN=IdenTrust Commercial Root CA 1
2 s:/C=US/O=IdenTrust/CN=IdenTrust Commercial Root CA 1
i:/O=Digital Signature Trust Co./CN=DST Root CA X3
Is it possible that the ACME client is trying to use IPv6 while the other tools are using IPv4? (Though I don’t think that would be likely to produce that particular socket error.)
2018-01-03 00:38:51,338:WARNING:certbot.renewal:Attempting to renew cert (themud.org) from /etc/letsencrypt/renewal/themud.org.conf produced an unexpected error: HTTPSConnectionPool(host='acme-v01.api.letsencrypt.org', port=443): Read ti
med out. (read timeout=45). Skipping.
2018-01-03 00:38:51,338:DEBUG:certbot.renewal:Traceback was:
Traceback (most recent call last):
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/renewal.py", line 425, in handle_renewal_request
main.renew_cert(lineage_config, plugins, renewal_candidate)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/main.py", line 743, in renew_cert
_get_and_save_cert(le_client, config, lineage=lineage)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/main.py", line 80, in _get_and_save_cert
renewal.renew_cert(config, domains, le_client, lineage)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/renewal.py", line 297, in renew_cert
new_certr, new_chain, new_key, _ = le_client.obtain_certificate(domains)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/client.py", line 318, in obtain_certificate
self.config.allow_subset_of_names)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/certbot/auth_handler.py", line 66, in get_authorizations
self.authzr[domain] = self.acme.request_domain_challenges(domain)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/acme/client.py", line 213, in request_domain_challenges
typ=messages.IDENTIFIER_FQDN, value=domain), new_authzr_uri)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/acme/client.py", line 192, in request_challenges
response = self.net.post(self.directory.new_authz, new_authz)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/acme/client.py", line 709, in post
return self._post_once(*args, **kwargs)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/acme/client.py", line 720, in _post_once
response = self._send_request('POST', url, data=data, **kwargs)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/acme/client.py", line 630, in _send_request
response = self.session.request(method, url, *args, **kwargs)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/opt/eff.org/certbot/venv/lib/python2.7/site-packages/requests/adapters.py", line 499, in send
raise ReadTimeout(e, request=request)
ReadTimeout: HTTPSConnectionPool(host='acme-v01.api.letsencrypt.org', port=443): Read timed out. (read timeout=45)
According to the log it connects to acme-v01.api.letsencrypt.org no problem at all only when it attempts to run the renew code is when it gets a timeout
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
files are being created on the webserver, but the remote server cannot connect to me.
OK tried one last thing I turned off SSL so only standard http would work and bam no issue,
looks like the certs will not always renew when too far expired.
That shouldn't be an issue, in and of itself. Let's Encrypt is tolerant of certificate issues when validating (perhaps ironically). The issue was that connecting to the site didn't work at all.
(I'm not sure what Apache does when an expired certificate causes OCSP stapling to fail, but I think it handles it well enough.)
Connecting to the site is still an issue, in fact.
Turning off the redirect to HTTPS just avoids the HTTPS problem, whatever it is.
My gut instinct says this was a server-side problem (with @adam-themud's server, not the ACME server) but I don't have any compelling theories
It sounds like the thread is resolved now. Very mysterious! I don't understand why the machine was able to reach the directory endpoint reliably except during the renewal operation. Very strange!