Error renewing cert, certbot status 400


#1

Hi guys! I’ve been renewing my certs before, but it’s always a painful process, as it never works easily. I believed I documented the process last time, but it seems I can’t find the exact steps I did to get a successful renewal last time. Can you please help me? The certbot fails every time with a connection refused, but I can connect with https no problem to my server. Until the cert expired, that is. I can provide logs and configs if needed.

My domain is: timonoj.duckdns.org

I ran this command: sudo certbot renew

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/timonoj.duckdns.org.conf


Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for timonoj.duckdns.org
Waiting for verification…
Cleaning up challenges
Attempting to renew cert (timonoj.duckdns.org) from /etc/letsencrypt/renewal/timonoj.duckdns.org.conf produced an unexpected error: Failed authorization procedure. timonoj.duckdns.org (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://timonoj.duckdns.org/.well-known/acme-challenge/UcIdvqN6GSJ5GSwRjIu1bNkxdPOC25LSvOrKkCGjJS4: Connection refused. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/timonoj.duckdns.org/fullchain.pem (failure)


All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/timonoj.duckdns.org/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:

My web server is (include version): nginx v1.14

The operating system my web server runs on is (include version): Ubuntu 18.04.01

My hosting provider, if applicable, is: home local server.

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): nope

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

Thanks!


#2

Have a look at https://letsencrypt.org/docs/allow-port-80/

From what I can tell, your ISP does not block port 80, so you should be able to port forward it to your webserver.

You may have been renewing via port 443 previously, but that’s generally no longer possible with Certbot: IMPORTANT: What you need to know about TLS-SNI validation issues . So you’ll need to setup nginx to listen on port 80, even if it all it does is redirect to port 443.


#3

Hi @timonoj

you may have used tls-sni-01 - validation. That worked with https. But this is deprecated, support ends 2019-02-13. So the standard method is http-01 - validation, an open port 80 is required.

But your machine blocks complete (not only port 80, same with port 443) ( https://check-your-website.server-daten.de/?q=timonoj.duckdns.org ):

Domainname Http-Status redirect Sec. G
http://timonoj.duckdns.org/
61.92.6.196 -2 1.830 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it 61.92.6.196:80
http://www.timonoj.duckdns.org/
61.92.6.196 -2 1.826 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it 61.92.6.196:80
https://timonoj.duckdns.org/
61.92.6.196 -2 1.814 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it 61.92.6.196:443
https://www.timonoj.duckdns.org/
61.92.6.196 -2 1.843 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it 61.92.6.196:443

Perhaps you may switch to dns-01 validation.


#4

You were right. I was renewing only using 443, and 80 was disabled. This worked just fine for the website, but seems certbot really doesn’t like it now. I just enabled it for testing, and went through with no problem…

Thank you all guys for your help.


closed #5

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