# Error renewing cert, certbot status 400

**URL:** <https://community.letsencrypt.org/t/error-renewing-cert-certbot-status-400/85883>\
**Category:** Help\
**Created:** [February 12, 2019, 3:34am UTC](https://community.letsencrypt.org/t/error-renewing-cert-certbot-status-400/85883 "2019-02-12T03:34:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timonoj](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@timonoj](https://community.letsencrypt.org/u/timonoj)\
**Post date:** [February 12, 2019, 3:34am UTC](https://community.letsencrypt.org/t/error-renewing-cert-certbot-status-400/85883/1 "2019-02-12T03:34:00Z")

</div>

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](http://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](http://timonoj.duckdns.org)  
Waiting for verification…  
Cleaning up challenges  
Attempting to renew cert ([timonoj.duckdns.org](http://timonoj.duckdns.org)) from /etc/letsencrypt/renewal/timonoj.duckdns.org.conf produced an unexpected error: Failed authorization procedure. [timonoj.duckdns.org](http://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:](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:

- The following errors were reported by the server:

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!

---

<div class="post-metadata">

**Author:** ![\_az](https://avatars.discourse-cdn.com/v4/letter/_/22d042/32.png) [@\_az](https://community.letsencrypt.org/u/_az)\
**Post date:** [February 12, 2019, 3:44am UTC](https://community.letsencrypt.org/t/error-renewing-cert-certbot-status-400/85883/2 "2019-02-12T03:44:10Z")

</div>

Have a look at [https://letsencrypt.org/docs/allow-port-80/](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](https://community.letsencrypt.org/t/important-what-you-need-to-know-about-tls-sni-validation-issues/50811) . So you’ll need to setup nginx to listen on port 80, even if it all it does is redirect to port 443.

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [February 12, 2019, 8:20am UTC](https://community.letsencrypt.org/t/error-renewing-cert-certbot-status-400/85883/3 "2019-02-12T08:20:49Z")

</div>

Hi @timonoj

> [@timonoj](#):
>
> The certbot fails every time with a connection refused, but I can connect with https no problem to my server.

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](https://check-your-website.server-daten.de/?q=timonoj.duckdns.org) ):

| Domainname | Http-Status | redirect | Sec. | G |
| --- | --- | --- | --- | --- |
| • [http://timonoj.duckdns.org/](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/](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/](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/](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.

---

<div class="post-metadata">

**Author:** ![timonoj](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@timonoj](https://community.letsencrypt.org/u/timonoj)\
**Post date:** [February 12, 2019, 8:49am UTC](https://community.letsencrypt.org/t/error-renewing-cert-certbot-status-400/85883/4 "2019-02-12T08:49:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [March 14, 2019, 8:49am UTC](https://community.letsencrypt.org/t/error-renewing-cert-certbot-status-400/85883/5 "2019-03-14T08:49:17Z")

</div>

Closed on March 14, 2019, 8:49am UTC

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