Unable to renew cert

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: help.cuscapi.com

I ran this command:certbot renew --dry-run

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


Processing /etc/letsencrypt/renewal/help.cuscapi.com.conf


Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for help.cuscapi.com
Waiting for verification…
Challenge failed for domain help.cuscapi.com
http-01 challenge for help.cuscapi.com
Cleaning up challenges
Attempting to renew cert (help.cuscapi.com) from /etc/letsencrypt/renewal/help.cuscapi.com.conf produced an unexpected error: Some challenges have failed… Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/help.cuscapi.com/fullchain.pem (failure)


** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates below have not been saved.)

All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/help.cuscapi.com/fullchain.pem (failure)
** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates above have not been saved.)


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

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: help.cuscapi.com
    Type: connection
    Detail: During secondary validation: Fetching
    http://help.cuscapi.com/.well-known/acme-challenge/3-FAM_NSirk-S0XYzr6CvtNxJ8LdzcehS_Kte_wpWf8:
    Timeout during connect (likely firewall problem)

    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): nginx version: nginx/1.12.2

The operating system my web server runs on is (include version):
CentOS Linux release 7.6.1810 (Core)

My hosting provider, if applicable, is: Self Hosted for Zammad

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):certbot 1.3.0

Zammad.conf

this is the nginx config for zammad

upstream zammad {
server localhost:3000;
}

upstream zammad-websocket {
server localhost:6042;
}

Added - Automatically redirect HTTP to HTTPS Nginx

server {
listen 80;
server_name help.cuscapi.com;
return 301 https://$host$request_uri;
}

Added - HTTPS configuration for Zammad

server {
listen 443 http2 ssl;

 ssl_certificate /etc/letsencrypt/live/help.cuscapi.com/fullchain.pem;
 ssl_certificate_key /etc/letsencrypt/live/help.cuscapi.com/privkey.pem;
 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 ssl_prefer_server_ciphers on;
 ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
 ssl_ecdh_curve secp384r1;
 ssl_session_cache shared:SSL:10m;
 ssl_session_tickets off;
 ssl_stapling on;
 ssl_stapling_verify on;
 add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
 add_header X-Frame-Options DENY;
 add_header X-Content-Type-Options nosniff;

 # replace 'localhost' with your fqdn/domain name if you want to use zammad from remote
 server_name help.cuscapi.com;

 root /opt/zammad/public;

 access_log /var/log/nginx/zammad.access.log;
 error_log  /var/log/nginx/zammad.error.log;

 client_max_body_size 50M;

 location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
     expires max;
 }

 location /.well-known/acme-challenge {
    default_type                text/plain;
}

 location /ws {
     proxy_http_version 1.1;
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "Upgrade";
     proxy_set_header CLIENT_IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_read_timeout 86400;
     proxy_pass http://zammad-websocket;
 }

We have previously renewed the cert few times which worked flawlessly. However this time after few weeks of trying it is still failing. Would appreciate your assistance here. Thank you in advcance

1 Like

The NGINX config may be fine, the problem is that HTTP is not accessible.
Is there a firewall?

1 Like

Yes there is a firewall and I have full access to it. I have created a temp policy to allow the server in coming and outgoing for http and https to any destination without geolocation

1 Like

HTTP is required for HTTP authentication.
[If that access is only temporary, that will become a problem when it comes time to renew.]

1 Like

the temp policy was created to ensure fw is not causing the issue. Now I have removed webblocking feature for that policy as well and im getting the below error

Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/help.cuscapi.com.conf


Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org
Attempting to renew cert (help.cuscapi.com) from /etc/letsencrypt/renewal/help.cuscapi.com.conf produced an unexpected error: (‘Connection aborted.’, error(101, ‘Network is unreachable’)). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/help.cuscapi.com/fullchain.pem (failure)


** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates below have not been saved.)

All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/help.cuscapi.com/fullchain.pem (failure)
** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates above have not been saved.)


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

Result for curl

curl -v https://acme-v02.api.letsencrypt.org/directory

  • About to connect() to acme-v02.api.letsencrypt.org port 443 (#0)
  • Trying 172.65.32.248…
  • Connection timed out
  • Trying 2606:4700:60:0:f53d:5624:85c7:3a2c…
  • Failed to connect to 2606:4700:60:0:f53d:5624:85c7:3a2c: Network is unreachable
  • Failed connect to acme-v02.api.letsencrypt.org:443; Network is unreachable
  • Closing connection 0
    curl: (7) Failed to connect to 2606:4700:60:0:f53d:5624:85c7:3a2c: Network is unreachable

It seems your being blocked on the way out (for IPv6).
Can you reach google?
curl -v6 https://google.com/

Can you reach LE via IPv4?
curl -v4 https://acme-v02.api.letsencrypt.org/directory

1 Like

Hi sorry for late reply.

Result for curl -4
curl -v4 https://acme-v02.api.letsencrypt.org/directory

  • About to connect() to acme-v02.api.letsencrypt.org port 443 (#0)
  • Trying 172.65.32.248…
  • Connected to acme-v02.api.letsencrypt.org (172.65.32.248) port 443 (#0)
  • Initializing NSS with certpath: sql:/etc/pki/nssdb
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  • Server certificate:
  •   subject: CN=acme-v01.api.letsencrypt.org
    
  •   start date: Mar 12 18:07:07 2020 GMT
    
  •   expire date: Jun 10 18:07:07 2020 GMT
    
  •   common name: acme-v01.api.letsencrypt.org
    
  •   issuer: CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US
    

GET /directory HTTP/1.1
User-Agent: curl/7.29.0
Host: acme-v02.api.letsencrypt.org
Accept: /

< HTTP/1.1 200 OK
< Server: nginx
< Date: Tue, 14 Apr 2020 09:46:17 GMT
< Content-Type: application/json
< Content-Length: 658
< Connection: keep-alive
< Cache-Control: public, max-age=0, no-cache
< X-Frame-Options: DENY
< Strict-Transport-Security: max-age=604800
<
{
“keyChange”: “https://acme-v02.api.letsencrypt.org/acme/key-change”,
“lOPOeUINqls”: “Adding random entries to the directory”,
“meta”: {
“caaIdentities”: [
letsencrypt.org
],
“termsOfService”: “https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf”,
“website”: “https://letsencrypt.org
},
“newAccount”: “https://acme-v02.api.letsencrypt.org/acme/new-acct”,
“newNonce”: “https://acme-v02.api.letsencrypt.org/acme/new-nonce”,
“newOrder”: “https://acme-v02.api.letsencrypt.org/acme/new-order”,
“revokeCert”: “https://acme-v02.api.letsencrypt.org/acme/revoke-cert

renew cert result

#certbot renew --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/help.cuscapi.com.conf


Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for help.cuscapi.com
Waiting for verification…
Challenge failed for domain help.cuscapi.com
http-01 challenge for help.cuscapi.com
Cleaning up challenges
Attempting to renew cert (help.cuscapi.com) from /etc/letsencrypt/renewal/help.cuscapi.com.conf produced an unexpected error: Some challenges have failed… Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/help.cuscapi.com/fullchain.pem (failure)


** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates below have not been saved.)

All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/help.cuscapi.com/fullchain.pem (failure)
** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates above have not been saved.)


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

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: help.cuscapi.com
    Type: connection
    Detail: Fetching
    http://help.cuscapi.com/.well-known/acme-challenge/cUig96qUk1MLz3UOKAuDroQI57w3h9dDPMmdhipHEI0:
    Timeout during connect (likely firewall problem)

    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.

Hi @holsyidnevil

read

Letsencrypt has switched the validation.

Your error message says:

The Letsencrypt servers are able to check your domain.

The other servers are blocked.

So you have a blocking firewall you have to find and remove.

If this isn’t possible -> switch to dns validation.

1 Like

Thank you !. Performing DNS validation worked for me. Still puzzled why the normal way doesnt work even when the FW allowed all incoming and outgoing connection from/to the source server.

1 Like

You only showed the result for curl with IPv4 to LE
You haven’t tested your system with curl with IPv6 to any other system.
Please try:

[or to any other site that supports IPv6]

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