Renouvellement de certificat Let's Encrypt / Yunohost 2.7.5

Bonjour à tous,

Il me reste encore 15 jours pour renouveler un certificat Let’sEncrypt, et la procédure automatique (via cron) m’adresse le courrier ci-après :

An attempt for renewing the certificate for domain 0zone.hd.free.fr failed with the following
error :

[Errno 22] Il semble que le domaine 0zone.hd.free.fr n’est pas accessible via HTTP. Veuillez vérifier que vos configuration DNS et nginx sont correctes
Traceback (most recent call last):
File “/usr/lib/moulinette/yunohost/certificate.py”, line 380, in certificate_renew
_check_domain_is_ready_for_ACME(domain)
File “/usr/lib/moulinette/yunohost/certificate.py”, line 822, in _check_domain_is_ready_for_ACME
’certmanager_domain_http_not_working’, domain=domain))
MoulinetteError: [Errno 22] Il semble que le domaine 0zone.hd.free.fr n’est pas accessible via HTTP. Veuillez vérifier que vos configuration DNS et nginx sont correctes

Here’s the tail of /var/log/yunohost/yunohost-cli.log, which might help to
investigate :

2017-12-31 06:25:34,430 INFO moulinette.actionsmap process - processing action [23563.1]: yunohost.domain.cert-renew
2017-12-31 06:25:35,705 INFO urllib3.connectionpool _new_conn - Starting new HTTP connection (1): 82.230.211.35
2017-12-31 06:25:45,716 WARNING yunohost.certmanager _domain_is_accessible_through_HTTP - [23563.1] Expiration du délai lors de la tentative du serveur de se contacter via HTTP en utilisant son adresse IP publique (domaine 0zone.hd.free.fr avec l’ IP 82.230.211.35). Vous rencontrez peut-être un problême d’hairpinning ou alors le pare-feu/routeur en amont de votre serveur est mal configuré.
2017-12-31 06:25:45,716 INFO yunohost.certmanager certificate_renew - [23563.1] No certificate needs to be renewed.
2017-12-31 06:39:19,158 INFO moulinette.actionsmap process - processing action [23655.1]: yunohost.app.fetchlist
2017-12-31 06:39:19,199 INFO urllib3.connectionpool _new_conn - Starting new HTTPS connection (1): app.yunohost.org
2017-12-31 06:39:19,732 SUCCESS yunohost.app success - [23655.1] La liste d’applications yunohost a été récupérée
2017-12-31 06:39:19,733 INFO urllib3.connectionpool _new_conn - Starting new HTTPS connection (1): app.yunohost.org
2017-12-31 06:39:20,461 SUCCESS yunohost.app success - [23655.1] La liste d’applications community a été récupérée
2018-01-01 06:25:16,866 INFO moulinette.actionsmap process - processing action [29946.1]: yunohost.domain.cert-renew
2018-01-01 06:25:17,845 INFO urllib3.connectionpool _new_conn - Starting new HTTP connection (1): 82.230.211.35
2018-01-01 06:25:20,857 INFO yunohost.certmanager certificate_renew - [29946.1] Now attempting renewing of certificate for domain 0zone.hd.free.fr !
2018-01-01 06:25:21,060 INFO urllib3.connectionpool _new_conn - Starting new HTTP connection (1): 82.230.211.35
2018-01-01 06:25:23,869 ERROR yunohost.certmanager certificate_renew - [29946.1] Certificate renewing for 0zone.hd.free.fr failed !
2018-01-01 06:25:23,869 ERROR yunohost.certmanager certificate_renew - [29946.1] Traceback (most recent call last):
File “/usr/lib/moulinette/yunohost/certificate.py”, line 380, in certificate_renew
_check_domain_is_ready_for_ACME(domain)
File “/usr/lib/moulinette/yunohost/certificate.py”, line 822, in _check_domain_is_ready_for_ACME
’certmanager_domain_http_not_working’, domain=domain))
MoulinetteError: [Errno 22] Il semble que le domaine 0zone.hd.free.fr n’est pas accessible via HTTP. Veuillez vérifier que vos configuration DNS et nginx sont correctes

2018-01-01 06:25:23,870 ERROR yunohost.certmanager certificate_renew - [29946.1] [Errno 22] Il semble que le domaine 0zone.hd.free.fr n’est pas accessible via HTTP. Veuillez vérifier que vos configuration DNS et nginx sont correctes
2018-01-01 06:25:23,870 ERROR yunohost.certmanager certificate_renew - [29946.1] Sending email with details to root …

– Certificate Manager

Le retour de la commande # yunohost -v donne ça :

yunohost: 2.7.5
yunohost-admin: 2.7.5
moulinette: 2.7.5
ssowat: 2.7.5

Le retour de la commande # yunohost domain cert-status me donne ceci :
certificates:
0zone.hd.free.fr:
CA_type: Let’s Encrypt
summary: Great!
validity: 15

Le retour de la commande # yunohost domain cert-renew me retourne ceci :
Erreur : Certificate renewing for 0zone.hd.free.fr failed !
Erreur : Traceback (most recent call last):
File “/usr/lib/moulinette/yunohost/certificate.py”, line 380, in certificate_renew
_check_domain_is_ready_for_ACME(domain)
File “/usr/lib/moulinette/yunohost/certificate.py”, line 822, in _check_domain_is_ready_for_ACME
’certmanager_domain_http_not_working’, domain=domain))
MoulinetteError: [Errno 22] Il semble que le domaine 0zone.hd.free.fr n’est pas accessible via HTTP. Veuillez vérifier que vos configuration DNS et nginx sont correctes

Erreur : [Errno 22] Il semble que le domaine 0zone.hd.free.fr n’est pas accessible via HTTP. Veuillez vérifier que vos configuration DNS et nginx sont correctes

Je n’ai (bien sûr) pas fait de changement sur les config DNS ou Nginx …

Pourriez-vous m’aider ?
D’avance, merci !
Éric

Salut,

comme indiqué par le message d’erreur, perso je n’arrive pas à accéder au domaine 0zone.hd.free.fr … Est-ce que tu y arrives de ton côté ? Même depuis l’extérieur de ton réseau ?

Par contre j’arrive à pinger ta machine, donc on dirait que c’est seulement le serveur web … ?

Est-ce que tu peux vérifier que nginx (le serveur web) tourne, soit depuis la webadmin dans ‘Services’, soit en ssh avec service nginx status (et nginx -t)

Hello Aleks,

Euh, oui, depuis un téléphone GSM (pas WiFi, of course …) j’accède bien au service Nextcloud.
Et la redirection http -> https me semble good (toujours depuis un phone)
Tu te présentes avec quelle IP ?

nginx -t me retourne ceci :

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Hmok, en fait visiblement ca marche si j’y accède en https (port 443) mais pas en http (port 80).

Tu peux vérifier que ton port 80 est routé correctement ?

Hummmm …
Je pige pas tout, mais tu avais raison, il y avait un pb avec mon port 80:
La conf de ma Freebox disait que l’@ de mon Yuno était en DMZ (et ce n’était pas suffisant …)
J’ai ajouté une redirection du port 80 et le renouvellement de mon certificat est passé :

yunohost domain cert-renew
Succès ! La configuration a été mise à jour pour le service « dnsmasq »
Succès ! Renouvellement avec succès d’un certificat Let’s Encrypt pour le domaine 0zone.hd.free.fr !

Merci beaucoup Aleks
(Yunohost n’était pas en cause … La conf’ Freebox, en revanche …)