Cannot renew “Failed authorization procedure”


#1

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. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: bestbatteriesonline.com

I ran this command: certbot renew

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


Processing /etc/letsencrypt/renewal/bestbatteriesonline.com.conf

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 bestbatteriesonline.com
tls-sni-01 challenge for www.bestbatteriesonline.com
Waiting for verification…
Cleaning up challenges
Attempting to renew cert (bestbatteriesonline.com) from /etc/letsencrypt/renewal/bestbatteriesonline.com.conf produced an unexpected error: Failed authorization procedure. www.bestbatteriesonline.com (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/bestbatteriesonline.com/fullchain.pem (failure)


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

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

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: www.bestbatteriesonline.com
    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|
|Release:|16.04|
|Codename:|xenial|

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. I use ssh.

Thank you for your help


#2

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?


#3

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.


#4

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

$ curl -v https://www.bestbatteriesonline.com/
*   Trying 80.92.65.144...
* connect to 80.92.65.144 port 443 failed: Connection refused
* Failed to connect to www.bestbatteriesonline.com port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to www.bestbatteriesonline.com port 443: Connection refused

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


#5

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.


#6

The IP 80.92.65.144 is not the IP of the server. It is a redirect configuration made on the DNS management (eurodns.com). I redirect in the DNS the www.bestbatteriesonline.com to bestbatteriesonline.com

Try curl -v https://62.75.139.39 which is the correct IP of the server. (this will also go to the true server: curl -v https://bestbatteriesonline.com)

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


#7

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 www.bestbatteriesonline.com resolve directly to 62.75.139.39, 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 https://www.bestbatteries.com/ will always get an error, even after you get the certificate working), there could be another option.


#8

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


#9

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