Renew certificate failed

Hello,

I have a problem updating the certificate on the reverse proxy, but I always get the error.

My domain is: engjv.totvs.io

I ran this command: certbot renew -v --dry-run / certbot certonly --force-renew -d engjv.totvs.io

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/engjv.totvs.io.conf


Certificate is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Simulating renewal of an existing certificate for engjv.totvs.io
Performing the following challenges:
http-01 challenge for engjv.totvs.io
Waiting for verification...
Challenge failed for domain engjv.totvs.io
http-01 challenge for engjv.totvs.io

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: engjv.totvs.io
Type: connection
Detail: During secondary validation: 138.219.88.222: Fetching http://engjv.totvs.io/.well-known/acme-challenge/F3rk4rE7IkfVGIt7gWYF1N47admPbTAkBAI2QK_MeRU: Timeout during connect (likely firewall problem)

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

Cleaning up challenges
Failed to renew certificate engjv.totvs.io with error: Some challenges have failed.


All simulated renewals failed. The following certificates could not be renewed:
/etc/letsencrypt/live/engjv.totvs.io/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My web server is (include version): nginx version: nginx/1.14.1

The operating system my web server runs on is (include version): Red Hat Enterprise Linux release 8.9 (Ootpa)

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 2.10.0

I ran a sniffer on the firewall to identify any blockages, but I didn't identify any.

That's won't help anything and can make you hit rate limits faster; please remove it.

That indicates that some locations can get to your server, but some can't. Let's Encrypt needs to validate that you control that domain name as seen from multiple places around the world.

Here's an online tool's report showing it only working from some parts of the world.

And this FAQ may be helpful too:

5 Likes

Hi Peter,

Thank you very much for the guidance.

I changed the command in crontab to: 0 12 1 1,3,5,7,9,11 * /usr/bin/certbot renew --quiet

Regarding the Multi-Perspective Validation & Geoblocking FAQ, this is new to me, so we checked if there are any restrictions at the firewall level geographically, but we didn't identify anything at first.

Using the tool https://check-host.net/check-http?host=http%3A%2F%2Fengjv.totvs.io%3A80&csrf_token=2ecc431079a9e98f9e59750feba22df6eedd1af2 , we identified that it was possible to validate my country (Brazil) and 4 other countries (Portugal, Russia, Spain, USA). Is it enough?

Thank you very much for your attention.

1 Like

Your cron should run certbot renew twice a day, at ideally a random time (or at least not the top of an hour). It checks to see which of the certificates that it's managing needs to be renewed, and only renews them if needed. (If there's some problem on Let's Encrypt's side with a certificate they issued, it may need to be renewed sooner, and if sometimes you hit a sporadic failure while trying to renew, then it can just try again the next day.) See their recommended script in the certbot manual which is just basically a fancy way to try to pick a random time during the day, and then 12 hours offset from that, every day.

According to this post, which I probably also should have linked, currently validation attempts happen from the US, Sweden, and Singapore. But the exact countries can and will change over time, as they work to verify that you actually control the name as seen from global perspectives.

4 Likes