New problem Connection refused on renewal

Hello

Please help, what could it be?

It work on January but now not. I have update cerbot due to TLS-SNI. I tried to stop nginx and run renewal it does not helped.

If the port for renewal has been changed from 443 to 80, maybe my nginx way to redirect all 80 request to 443 broke the renewal?

server {
listen 79.174.65.34:80;
server_name itcooky.com www.itcooky.com ;
return 301 https://itcooky.com$request_uri;
}

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: itcooky.com and some more

I ran this command: certbot-auto renew

It produced this output:
Processing /etc/letsencrypt/renewal/itcooky.com.conf


Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator webroot, Installer None
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for itcooky.com
http-01 challenge for www.itcooky.com
Waiting for verification…
Challenge failed for domain www.itcooky.com
Challenge failed for domain itcooky.com
http-01 challenge for www.itcooky.com
http-01 challenge for itcooky.com
Cleaning up challenges
Attempting to renew cert (itcooky.com) from /etc/letsencrypt/renewal/itcooky.com.conf produced an unexpected error: Some challenges have failed… Skipping.

Domain: www.itcooky.com
Type: connection
Detail: Fetching
https://itcooky.com/.well-known/acme-challenge/tD_ToCHIXBNxO5t6KDmRJxZ3U35eP-KGrxZVFZ1HIs4:
Connection refused

Domain: itcooky.com
Type: connection
Detail: Fetching
https://itcooky.com/.well-known/acme-challenge/U7_u9soG8GVd3DFvCG-EFXLnS4ReEKADV18N7pj-i5o:
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.

  • The following errors were reported by the server:

My web server is (include version): nginx

The operating system my web server runs on is (include version): centos 6

My hosting provider, if applicable, is: vps

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

Hi @Alexandr1Bu

your port 80 doesn't answer ( https://check-your-website.server-daten.de/?q=itcooky.com ):

Domainname Http-Status redirect Sec. G
http://itcooky.com/
79.174.65.34 301 https://itcooky.com/ 0.110 A
http://www.itcooky.com/
79.174.65.34 301 https://itcooky.com/ 0.110 E
http://itcooky.com/
2a01:d8:4:2::450 -2 1.173 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it [2a01:d8:4:2::450]:80
http://www.itcooky.com/
2a01:d8:4:2::450 -2 1.180 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it [2a01:d8:4:2::450]:80
https://itcooky.com/
79.174.65.34 301 https://www.itcooky.com/ 2.357 A
https://itcooky.com/
2a01:d8:4:2::450 -2 1.183 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it [2a01:d8:4:2::450]:443
https://www.itcooky.com/
79.174.65.34 200 3.887 I
https://www.itcooky.com/
2a01:d8:4:2::450 -2 1.170 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it [2a01:d8:4:2::450]:443
http://itcooky.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
79.174.65.34 301 https://itcooky.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 0.113 A
Visible Content: 301 Moved Permanently nginx/1.10.2
http://www.itcooky.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
79.174.65.34 301 https://itcooky.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 0.113 E
Visible Content: 301 Moved Permanently nginx/1.10.2
http://itcooky.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
2a01:d8:4:2::450 -2 1.180 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it [2a01:d8:4:2::450]:80
Visible Content:
http://www.itcooky.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de
2a01:d8:4:2::450 -2 1.170 V
ConnectFailure - Unable to connect to the remote server No connection could be made because the target machine actively refused it [2a01:d8:4:2::450]:80
Visible Content:
https://itcooky.com/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de 404 3.994 A
Not Found
Visible Content: 404

If you want to use http-01 validation, port 80 / http must answer. Certbot creates a file in /.well-known/acme-challenge, Letsencrypt tries to fetch that file.

Looks like a firewall or something else, that blocks.

A (correct) redirect http -> https isn't a problem, Letsencrypt follows these redirects.

But the first GET is via port 80.

1 Like

PS: Sorry, incomplete answer:

You have ipv4- and ipv6 addresses:

Host T IP-Address is auth. ∑ Queries ∑ Timeout
itcooky.com A 79.174.65.34 yes 2 0
AAAA 2a01:d8:4:2::450 yes
www.itcooky.com C itcooky.com yes 1 0
A 79.174.65.34 yes
AAAA 2a01:d8:4:2::450 yes

And your ipv6 doesn’t answer.

So

  • remove the ipv6 entry, create a new certificate, then fix the ipv6 (or)
  • fix the ipv6

Check, if you have a

Listen [::]:80
Listen [::]:443

PS: Letsencrypt prefers ipv6, so this is critical.

1 Like

Thank you, very much! Now i understood - DNS is giving for my web address ip4 and ip6, letsencrypt takes ip6 but it is not set on my nginx config!

I copiyed all nginx config for ip4 to new for ip6 changed only the listen string
listen [2a01:d8:4:2::450]:80;
and
listen [2a01:d8:4:2::450]:443 ssl;

And renewal works now

Thank you

4 Likes

Yes, that's the problem.

Happy to read that it works now.

Ipv6 is old - and it's the future :wink:

1 Like

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