Impossible d’obtenir certificat Let’s encrypt sous domaine

Bonjour à tous,

Mon serveur YunoHost

Matériel: VM sur serveur dédier
Version de YunoHost: 4.1.6
J’ai accès à mon serveur : En SSH | Par la webadmin …
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

Je créer un sous domaine chez sur mon domaine chez mon registrar OVH.
Après avec configurer le dns correctement j’ai rajouté mon domaine sur mon serveur et j’ai fait une demande pour obtenir un certificat Let’s encrypt.

Voici des messages d’erreurs

args:
  force: false
  no_checks: false
  staging: false
ended_at: 2021-02-02 20:27:20.873886
error: 'Certificate installation for beta.domain2.tld failed !

  Exception: Impossible de signer le nouveau certificat'
interface: api
operation: letsencrypt_cert_install
parent: null
related_to:
- - domain
  - beta.domain2.tld
started_at: 2021-02-02 20:27:16.727232
success: false
yunohost_version: 4.1.6

============

2021-02-02 21:27:16,737: DEBUG - Making sure tmp folders exists...
2021-02-02 21:27:16,751: DEBUG - Fetching IP from https://ip.yunohost.org 
2021-02-02 21:27:16,821: DEBUG - IP fetched: xx.xx.xx.xx
2021-02-02 21:27:16,829: DEBUG - No default route for IPv6, so assuming there's no IP address for that version
2021-02-02 21:27:16,829: DEBUG - IP fetched: None
2021-02-02 21:27:16,829: DEBUG - Prepare key and certificate signing request (CSR) for beta.domain2.tld...
2021-02-02 21:27:16,909: DEBUG - Saving to /tmp/acme-challenge-private/beta.domain2.tld.csr.
2021-02-02 21:27:16,909: DEBUG - Now using ACME Tiny to sign the certificate...
2021-02-02 21:27:16,909: INFO - Parsing account key...
2021-02-02 21:27:16,921: INFO - Parsing CSR...
2021-02-02 21:27:16,931: INFO - Found domains: beta.domain2.tld
2021-02-02 21:27:16,932: INFO - Getting directory...
2021-02-02 21:27:17,455: INFO - Directory found!
2021-02-02 21:27:17,455: INFO - Registering account...
2021-02-02 21:27:18,537: INFO - Already registered!
2021-02-02 21:27:18,538: INFO - Creating new order...
2021-02-02 21:27:19,679: INFO - Order created!
2021-02-02 21:27:20,847: INFO - Verifying beta.domain2.tld...
2021-02-02 21:27:20,872: ERROR - Wrote file to /tmp/acme-challenge-public/UkrqFnZD4SlT_s1wOJ3p3a_lH7-HJTeEtK83basBrIk, but couldn't download http://beta.domain2.tld/.well-known/acme-challenge/UkrqFnZD4SlT_s1wOJ3p3a_lH7-HJTeEtK83basBrIk: Error:
Url: http://beta.domain2.tld/.well-known/acme-challenge/UkrqFnZD4SlT_s1wOJ3p3a_lH7-HJTeEtK83basBrIk
Data: None
Response Code: None
Response: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>
2021-02-02 21:27:20,873: ERROR - Certificate installation for beta.domain2.tld failed !
Exception: Impossible de signer le nouveau certificat

Pouvez-vous m’aider s’il vous plait, merci.

Bonsoir et bienvenu sur le forum @sixthdoor,

Par hasard le domaine n’était pas déjà avec un certificat Let’s encrypt avant d’être redirigé vers ton serveur Yunohost ?

Et sinon un ping du nom de domaine renvoi bien l’adresse IPv4 voir IPv6 de ton serveur Yunohost ?

Amicalement,
Gaëtan.

Merci pour ton retour rapide.

Le domaine ou le sous domaine ? : le domaine à effectivement un certificat Let’s encrypt et il est configuré sur mon serveur.

Si je fais un ping il renvoi bien l’ip de mon serveur. ^^

Re,

Le sous-domaine car je pense que le domaine n’a pas de soucis de certificat ni d’accès au serveur ?

Amicalement,
Gaëtan.

Non le sous-domaine n’avait pas encore de certificat il est tout neuf tout beau ^^
Effectivement le domaine fonctionne bien et il a son certificat.

Ok,

que donne :

dig +short beta.domain2.tld
dig +short beta.domain2.tld @1.1.1.1

Amicalement,
Gaëtan.

Sur les deux commandes c’est l’ip public de mon serveur qui remonte.

Ok,

Alors :

sudo yunohost domain cert-status

beta.domain2.tld:
CA_type: Self-signed
summary: WARNING
validity: 3646

Et soyons fou :

sudo yunohost domain cert-install --no-checks

1 Like

Info : Now attempting install of certificate for domain beta.domain2.tld!
Info : Parsing account key…
Info : Parsing CSR…
Info : Found domains: beta.domain2.tld
Info : Getting directory…
Info : Directory found!
Info : Registering account…
Info : Already registered!
Info : Creating new order…
Info : Order created!
Info : Verifying beta.domain2.tld…
Info : beta.domain2.tld verified!
Info : Signing certificate…
Info : Certificate signed!
Succès ! La configuration a été mise à jour pour ‘nginx’
Succès ! Le certificat Let’s Encrypt est maintenant installé pour le domaine « beta.domain2.tld »

Super, mais pourquoi un --no-checks ?

Re,

sudo yunohost domain cert-install -h

  --no-checks    Does not perform any check that your domain seems correctly
                 configured (DNS, reachability) before attempting to install.
                 (Not recommended)

En faite si le nom de domaine (ou sous domaine) vient d’être créé Let’s Encrypt ne le connais pas encore (enfin c’est ce que j’en ai déduit lors de mes derniers tests) et donc il n’arrive pas à le joindre pour faire les tests de DNS, le paramètre --no-checks lui ordonne de quand même créer le domaine même si les DNS ne sont pas joignables ou à jours.

Maintenant reste à voir ce que ça va donner dans les prochains jours, prochaines semaines voir lors du renouvellement. À surveiller.

J’ai vu également que si ton serveur se connecte en priorité en IPv6 alors la demande chez Let’s Encrypt passe par l’IPv6 et il veut donc revenir sur ton serveur par l’IPv6, mais si ton serveur n’est pas joignable en IPv6 par le nom de domaine ou sous-domaine alors l’installation d’un nouveau certificat échoue (j’ai également eu ça lors de mes derniers tests).

Voilà reste à voir la suite.

Amicalement,
Gaëtan.

Merci pour toutes ces explications et cette rapidité.
C’est génial !

Bonne soirée

Hi,

I just wanted to say that I’m experiencing the same issue.
Main domain has no problem acquiring Let’s Encrypt cert but the process fails for subdomains.

I have run sudo yunohost domain cert-install --no-checks and it has worked.

Clean install on a Raspberry Pi 4 — YunoHost 4.1.7.1 (stable)

Hello,

Thank you for your feedback

Gaëtan.

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