Renouvellement automatique et manuel de certificat Let’s Encrypt échoue

Mon serveur YunoHost

Matériel: Raspberry Pi à la maison
Version de YunoHost: 4.3.6.3 (stable)
J’ai accès à mon serveur : En SSH et Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non
yunohost installé depuis au moins 2 ans:

Description du problème

Bonjour à tous.
Se matin mon navigateur m’informe que mon certificat Let’s Encrypt est périmé.

Un tour dans les journaux me montre que le problème a lieu depuis 16 jours

Je fais donc la commande suivante

$ sudo yunohost domain cert-install xxxxxxxxxx.pro.dns-orange.fr

Trouvé ici

J’obtiens l’erreur suivante

$ sudo yunohost domain cert-install xxxxxxxxxx.pro.dns-orange.fr
Warning: 'yunohost domain cert-install' is deprecated and will be removed in the future
Warning: 'yunohost domain cert-install' is deprecated and will be removed in the future
Info: Now attempting install of certificate for domain xxxxxxxxxx.pro.dns-orange.fr!
Warning: Subdomain 'xmpp-upload.xxxxxxxxxx.pro.dns-orange.fr' does not resolve to the same IP address as 'xxxxxxxxxx.pro.dns-orange.fr'. Some features will not be available until you fix this and regenerate the certificate.
Info: Parsing account key...
Info: Parsing CSR...
Info: Found domains: xxxxxxxxxx.pro.dns-orange.fr
Info: Getting directory...
Info: Directory found!
Info: Registering account...
Info: Already registered!
Info: Creating new order...
Info: Order created!
Info: Verifying xxxxxxxxxx.pro.dns-orange.fr...
Error: Wrote file to /tmp/acme-challenge-public/kj5-KImoxdUvXHjHkxk19J1wZRWbhwJYU56I_T2nE-s, but couldn't download http://xxxxxxxxxx.pro.dns-orange.fr/.well-known/acme-challenge/kj5-KImoxdUvXHjHkxk19J1wZRWbhwJYU56I_T2nE-s: Error:
Url: http://xxxxxxxxxx.pro.dns-orange.fr/.well-known/acme-challenge/kj5-KImoxdUvXHjHkxk19J1wZRWbhwJYU56I_T2nE-s
Data: None
Response Code: None
Response: <urlopen error [Errno 113] No route to host>
Error: Certificate installation for xxxxxxxxxx.pro.dns-orange.fr failed !
Exception: Could not sign the new certificate
Info: The operation 'Install a Let's Encrypt certificate on 'xxxxxxxxxx.pro.dns-orange.fr' domain' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220404-084544-letsencrypt_cert_install-xxxxxxxxxx.pro.dns-orange.fr' to get help

Même souci avec l’administration web

Pour l’instant je suis en auto-signé

Les Logs

2022-04-04 11:54:43,814: DEBUG - Making sure tmp folders exists...
2022-04-04 11:54:43,832: DEBUG - Reusing IPv4 from cache: 86.209.240.222
2022-04-04 11:54:43,832: DEBUG - Reusing IPv6 from cache: None
2022-04-04 11:54:43,834: DEBUG - Prepare key and certificate signing request (CSR) for xxxxxxxxxx.pro.dns-orange.fr...
2022-04-04 11:54:46,031: WARNING - Le sous-domaine 'xmpp-upload.xxxxxxxxxx.pro.dns-orange.fr' ne résout pas vers la même adresse IP que 'xxxxxxxxxx.pro.dns-orange.fr'. Certaines fonctionnalités seront indisponibles tant que vous n'aurez pas corrigé cela et regénéré le certificat.
2022-04-04 11:54:46,085: DEBUG - Saving to /tmp/acme-challenge-private/xxxxxxxxxx.pro.dns-orange.fr.csr.
2022-04-04 11:54:46,086: DEBUG - Now using ACME Tiny to sign the certificate...
2022-04-04 11:54:46,086: INFO - Parsing account key...
2022-04-04 11:54:46,111: INFO - Parsing CSR...
2022-04-04 11:54:46,136: INFO - Found domains: xxxxxxxxxx.pro.dns-orange.fr
2022-04-04 11:54:46,138: INFO - Getting directory...
2022-04-04 11:54:46,665: INFO - Directory found!
2022-04-04 11:54:46,666: INFO - Registering account...
2022-04-04 11:54:47,935: INFO - Already registered!
2022-04-04 11:54:47,936: INFO - Creating new order...
2022-04-04 11:54:49,230: INFO - Order created!
2022-04-04 11:54:50,497: INFO - Verifying xxxxxxxxxx.pro.dns-orange.fr...
2022-04-04 11:54:53,658: ERROR - Wrote file to /tmp/acme-challenge-public/kj5-KImoxdUvXHjHkxk19J1wZRWbhwJYU56I_T2nE-s, but couldn't download http://xxxxxxxxxx.pro.dns-orange.fr/.well-known/acme-challenge/kj5-KImoxdUvXHjHkxk19J1wZRWbhwJYU56I_T2nE-s: Error:
Url: http://xxxxxxxxxx.pro.dns-orange.fr/.well-known/acme-challenge/kj5-KImoxdUvXHjHkxk19J1wZRWbhwJYU56I_T2nE-s
Data: None
Response Code: None
Response: <urlopen error [Errno 113] No route to host>
2022-04-04 11:54:53,661: ERROR - Certificate installation for xxxxxxxxxx.pro.dns-orange.fr failed !
Exception: Impossible de signer le nouveau certificat

Merci pour votre aide

Ca sent le problème de hairpinning.
Tu peux tenter d’ajouter les lignes suivantes à ton fichier Hosts sur le serveur YunoHost (sudo nano /etc/hosts)

::1         xxxxxxxxxx.pro.dns-orange.fr
127.0.0.1   xxxxxxxxxx.pro.dns-orange.fr

Puis de retenter de générer le certificat

Tu as aussi un soucis d’enregistrement DNS manquant pour le support de XMPP. Tu peux ajouter un enregistrement CNAME de xmpp-upload.xxxxxxxxxx.pro.dns-orange.fr vers xxxxxxxxxx.pro.dns-orange.fr. pour corriger ça.

Merci @rungeard
En effet j’ai modifié le fichier host sur tous mes appareils mais pas sur le serveur Yunohost.

Je n’ai pas de nom de domaine pour mon serveur, j’utilise le service dynDNS fourni par ma livebox pro pour rediriger vers yunohost.

C’est suffisant pour ce que j’en fais
Nexcloud
Wordpress pour faire des tests en local.

Donc je ne peux pas modifier CNAME

Moi je pensais à un problème de droit en écriture sur le dossier .well-known, peut être que j’ai fait une mauvaise manipulation en sftp:// avec nautilus.

Les dernières applications installées sont
SPIP et phpMyAdmin
Mais je ne vois pas pourquoi elles auraient une incidence sur le problème.

Je modifie le host dans la soirée et vous tiens au courant.

Merci @rungeard
Problème résolu.

J’ai édité sudo nano /etc/hosts
et je me suis aperçu que j’avais déjà modifié celui-ci.

En effet je peux me connecter au serveur

  • en RJ45 j’utilise l’adresse IP 192.xxx.x.199
  • en wifi l’adresse IP 192.xxx.x.198

J’avais donc mis dans hosts
192.xxx.x.198 xxxxxxxxxx.pro.dns-orange.fr

je l’ai retransformée en
192.xxx.x.199 xxxxxxxxxx.pro.dns-orange.fr

Et le renouvellement du certificat Let’s Encrypt a fonctionné.

par contre je ne me rappelle plus ce qui m’avait motivé à mettre cette adresse IP pour me connecter en wifi.

En tout cas merci pour ton aide.

1 Like

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