Cannot renew “Failed authorization procedure”

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., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: certbot renew

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

Processing /etc/letsencrypt/renewal/

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

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

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


  • The following errors were reported by the server:

    Type: connection
    Detail: Connection refused

    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 Apache/2.4.18 (Ubuntu)

The operating system my web server runs on is (include version):
|Distributor ID:|Ubuntu|
|Description:|Ubuntu 16.04.4 LTS|

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
no. I use ssh.

Thank you for your help

Hi @Kadafi,

Your server doesn’t accept incoming connections on port 443 at all. Do you have a firewall blocking this port? Did you shut down your web server or did it crash somehow?

No. It is because the HSTS is checking that the certificate is out of valid date and it blocks. It does not even reaches the Apache2 virtualhost.

That's not the problem that I'm seeing.

$ curl -v
*   Trying
* connect to port 443 failed: Connection refused
* Failed to connect to port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to port 443: Connection refused

This is at the TCP level, not the HTTPS level. curl doesn't even implement HSTS.

For its part, Apache doesn’t know about HSTS and wouldn’t refuse to serve a site with an expired certificate. We probably see a dozen or so Apache-hosted sites with expired certificates on this forum every week… where the problem then manifests as a browser error complaining about the expired certificate.

The IP is not the IP of the server. It is a redirect configuration made on the DNS management ( I redirect in the DNS the to

Try curl -v which is the correct IP of the server. (this will also go to the true server: curl -v

Please note that all worked when i made the first time the instalation of the certifcate using your bot.

Aha! The error is because of this redirection. It isn't happening at the DNS level, but at the HTTP level. The method that you're using to obtain the certificate isn't compatible with this style of redirection.

If you can make resolve directly to, the renewal should succeed as it is.

If you need to continue using the HTTP-level redirection for some reason (which I wouldn't recommend because a user typing will always get an error, even after you get the certificate working), there could be another option.

you were right. I removed the redirect instruction in the DNS and it worked. Thank you.

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