• Serveurs
  • Echec renouvellement certificat LetsEncrypt

Hello Hello
Sur une de mes VM j'ai installé Nextcloud via ce tuto https://www.c-rieger.de/nextcloud-installation-guide-debian/#c02

Tout fonctionnait pour dans le meilleur des mondes sauf qu'au moment de renouveler les certificats je tombe sur cette erreur **mondomaine:Verify error:Fetching mondomaine/.well-known/acme-challenge/dGwW6f6WbG2c2NmrWJYPNKF-XdpcGLVFOskMLLt6zHA: Error getting validation data
**

J'ai pensé que c'était les anciens fichiers .pem qui bloquaient et je les aient supprimé (oui je suis un boulet) et du coup maintenance c'est mon nginx qui plante car il ne le trouvent plus...

Je me suis également demandé si ce n'était pas un problème au niveau de mon fournisseur de nom de domaine mais tout semble correct à ce niveau...

Auriez vous des pistes ? ( je peux fournir les éléments nécessaires...)

MErci 🙂

Il faut mettre acme.sh à jour let's encrypt ont changé leur fournisseur CDN.

Letsencrypt CA recent changed the CDN provider, which resulted in hanging issues.
Any downstream package should update.
This is important.

Pour mettre à jour.

acme.sh --upgrade

Merci @Magicalex pour ton retour.

J'ai fait ta manip et j'ai toujours le même problème..
cloud.superboki.com:Verify error:Fetching http://cloud.superboki.com/.well-known/acme-challenge/RmUIM_sJt3OurgLIZRHOFBNZ5AxLsSuniVz9Zu9fZp8: Error get ting validation data

Penses tu que le fait que NGINX ne fonctionne pas puisse empecher cette recreation de certificat?

    superboki Ah ba oui, il peut pas atteindre ton url http://cloud.superboki.com/.well-known/acme-challenge/RmUIM_sJt3OurgLIZRHOFBNZ5AxLsSuniVz9Zu9fZp8

      Magicalex Je sais bien, c'est la mon soucis... comment je peux faire pour contourner ce facheux soucis à ton avis?
      Car nginx refuse de fonctionner car il ne trouve pas les certificats... c est un cercle vicieux... ^^

        Magicalex c'est ce que j'avais fait en commentant de la sorte

        server {
        server_name cloud.superboki.com;
        listen 80 default_server;
        listen [::]:80 default_server;
        location ^~ /.well-known/acme-challenge {
        proxy_pass http://127.0.0.1:81;
        proxy_set_header Host $host;
        }
        location / {
        return 301 https://$host$request_uri;
        }
        }
        server {
        server_name cloud.superboki.com;
        #listen 443 ssl http2 default_server;
        listen [::]:443 ssl http2 default_server;
        root /var/www/nextcloud/;
        location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
        }
        location = /.well-known/carddav {
        return 301 $scheme://$host/remote.php/dav;
        }
        location = /.well-known/caldav {
        return 301 $scheme://$host/remote.php/dav;
        }

        J'ai toujours l'erreur pour NGINX

        Oct 31 12:57:38 NEXTCLOUD systemd[1]: Starting A high performance web server and a reverse proxy server...
        Oct 31 12:57:38 NEXTCLOUD nginx[2261]: nginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/conf.d/nextcloud.conf:13
        Oct 31 12:57:38 NEXTCLOUD nginx[2261]: nginx: configuration file /etc/nginx/nginx.conf test failed
        Oct 31 12:57:38 NEXTCLOUD systemd[1]: nginx.service: Control process exited, code=exited status=1
        Oct 31 12:57:38 NEXTCLOUD systemd[1]: Failed to start A high performance web server and a reverse proxy server.
        Oct 31 12:57:38 NEXTCLOUD systemd[1]: nginx.service: Unit entered failed state.
        Oct 31 12:57:38 NEXTCLOUD systemd[1]: nginx.service: Failed with result 'exit-code'.

        Indente la configuration, ça devient vite illisible ^^
        Donc pas besoin d'écouter sur le port 443 pour générer le certificat normalement.

        server {
            server_name cloud.superboki.com;
            listen 80 default_server;
            listen [::]:80 default_server;
            
            location ^~ /.well-known/acme-challenge {
                proxy_pass http://127.0.0.1:81;
                proxy_set_header Host $host;
            }
        
            location / {
                return 301 https://$host$request_uri;
            }
        }
        
        # server {
        #     server_name cloud.superboki.com;
        #     listen 443 ssl http2 default_server;
        #     listen [::]:443 ssl http2 default_server;
        #     root /var/www/nextcloud/;
        
        #     location = /robots.txt {
        #         allow all;
        #         log_not_found off;
        #         access_log off;
        #     }
        
        #     location = /.well-known/carddav {
        #         return 301 $scheme://$host/remote.php/dav;
        #     }
        
        #     location = /.well-known/caldav {
        #         return 301 $scheme://$host/remote.php/dav;
        #     }
        # }

          Magicalex oui désolé j'ai fait le cochon... bon NGINX se relance correctement, mais toujours le même soucis lorsque je veux obtenir mon certificat :

          root@NEXTCLOUD:/etc/nginx/conf.d# acme.sh --issue -d cloud.superboki.com --keylength 4096 -w /var/www/letsencrypt --key-file /etc/letsencrypt/rsa-certs/privkey.pem --ca-file /etc/letsencrypt/rsa-certs/chain.pem --cert-file /etc/letsencrypt/rsa-certs/cert.pem --fullchain-file /etc/letsencrypt/rsa-certs/fullchain.pem --force
          [Thu Oct 31 13:10:39 CET 2019] Single domain='cloud.superboki.com'
          [Thu Oct 31 13:10:39 CET 2019] Getting domain auth token for each domain
          [Thu Oct 31 13:10:41 CET 2019] Getting webroot for domain='cloud.superboki.com'
          [Thu Oct 31 13:10:41 CET 2019] Verifying: cloud.superboki.com
          [Thu Oct 31 13:10:45 CET 2019] Pending
          [Thu Oct 31 13:10:47 CET 2019] cloud.superboki.com:Verify error:Fetching http://cloud.superboki.com/.well-known/acme-challenge/4IrhH7LsCyK9Hco7GP7texssSFUoJbsX8TbQGyuZzqg: Error getting validation data
          [Thu Oct 31 13:10:47 CET 2019] Please add '--debug' or '--log' to check more details.
          [Thu Oct 31 13:10:47 CET 2019] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh

          Oui mais après là c'est de la configuration classique. ça vient pas de acme.sh ton uri /.well-known/acme-challenge n'est pas du tout correctement configuré. Tu fais appel à un proxy alors que nous on cherche le fichier /.well-known/acme-challenge/RmUIM_sJt3OurgLIZRHOFBNZ5AxLsSuniVz9Zu9fZp8

          Je te laisse au différent tuto que tu peux trouver sur le forum à ce sujet.

            Magicalex Je comprend bien, ce qui m'étonne c est que cela fonctionnait auparavant...

            As tu des liens à me fournir car j'ai fouiller un peu avant de faire ma demande et je ne trouve pas quelques chose qui colle vraiment à mon problème 🙁

              Magicalex merci 🙂

              J'ai repris ton tuto et j'ai toujours la même erreur :
              root@NEXTCLOUD:/etc/nginx/conf.d# acme.sh --issue --keylength 4096 --webroot /var/www/acme --domain cloud.superboki.com --domain www.cloud.superboki.com
              [Thu Oct 31 13:44:22 CET 2019] Multi domain='DNS:cloud.superboki.com,DNS:www.cloud.superboki.com'
              [Thu Oct 31 13:44:22 CET 2019] Getting domain auth token for each domain
              [Thu Oct 31 13:44:26 CET 2019] Getting webroot for domain='cloud.superboki.com'
              [Thu Oct 31 13:44:26 CET 2019] Getting webroot for domain='www.cloud.superboki.com'
              [Thu Oct 31 13:44:26 CET 2019] Verifying: cloud.superboki.com
              [Thu Oct 31 13:44:29 CET 2019] Pending
              [Thu Oct 31 13:44:32 CET 2019] cloud.superboki.com:Verify error:Fetching http://cloud.superboki.com/.well-known/acme-challenge/yaZ_LEAuLYT7lnpkCKB2CBJBmNPBkr3oOwJDofGPPns: Error getting validation data
              [Thu Oct 31 13:44:32 CET 2019] Please check log file for more details: /root/.acme.sh/acme.sh.log

              Par contre lorsque je fais nginx -t j'ai un warn :

              nginx: [warn] conflicting server name "cloud.superboki.com" on 0.0.0.0:80, ignored
              nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
              nginx: configuration file /etc/nginx/nginx.conf test is successful

              Tu penses que cela peut avoir un lien?

                Répondre…