Certbot renew failure connection reset by peer

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

Note - this has worked for a long time, but has suddenly stopped.
My domain is: doosan-ivusadev.com

I ran this command:
certbot --force-renewal -d doosan-ivusadev.com

It produced this output:
[root@ashdivacwebdev letsencrypt]# certbot --force-renewal -d doosan-ivusadev.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Renewing an existing certificate for doosan-ivusadev.com
Performing the following challenges:
http-01 challenge for doosan-ivusadev.com
Waiting for verification...
Challenge failed for domain doosan-ivusadev.com
http-01 challenge for doosan-ivusadev.com
Cleaning up challenges
Some challenges have failed.


  • The following errors were reported by the server:

    Domain: doosan-ivusadev.com
    Type: connection
    Detail: Fetching
    Connection reset by peer

    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.

My web server is (include version):
Apache/2.4.6 (CentOS)

The operating system my web server runs on is (include version):
CentOS Linux release 7.9.2009 (Core)

My hosting provider, if applicable, is:

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 1.11.0

@ia0001671 Welcome to the community

We have seen similar problems recently and those have been caused by updates to a router / firewall which was blocking the acme challenge path from reaching the server. Attempts reaching your server fail in a similar way:

curl -I doosan-ivusadev.com/.well-known/acme-challenge
(note using the acme challenge path but without trailing slash for file name)
HTTP/1.1 301 Moved Permanently
Date: Mon, 18 Apr 2022 19:30:42 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 mod_perl/2.0.11 Perl/v5.16.3
Location: https://doosan-ivusadev.com/.well-known/acme-challenge
Content-Type: text/html; charset=iso-8859-1

curl -I doosan-ivusadev.com/.well-known/acme-challenge/
curl: (56) Recv failure: Connection reset by peer

curl -I doosan-ivusadev.com/.well-known/acme-challenge/ForumTest
curl: (56) Recv failure: Connection reset by peer

Is the acme challenge path supposed to exist on the server? it's not there.

Not when you use the apache plug-in (or nginx one either). Temp changes are made directly to the server config and then removed.

In the case of missing files though it is unusual to get a 'reset by peer' response. That is more likely a firewall


Oh, once you resolve the acme challenge problem you might want to look at the cert chain Apache is sending. You are sending the leaf twice at the start of the chain. My guess is you are using fullchain.pem instead of chain.pem in the SSLCertificateChainFile setting in your (old) Apache VirtualHost


We were unable to find any firewall or intrusion prevention that would have caused this issue.
We ended up getting a vendor to set up DNS auth with a TXT record, which worked just fine.
certbot certonly --manual --preferred-challenges dns -d doosan-ivusadev.com

OK but you will need to repeat that every 60-90 days. The manual challenges cannot be auto-renewed.

Your current cert expires Jul18 and usually renews start 30 days before that to ensure time to resolve issues with your setup or Let's Encrypt problems.


Got it.


Even better is to automate the DNS challenge, e.g. by transfering your domains authorative DNS servers to one of the DNS providers Certbot has a DNS plugin for (User Guide — Certbot 1.26.0 documentation), such as Cloudflare (which is free as far as I know) or e.g. use acme-dns.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.