Certificat Let's Encrypt expiré, cert-renew part en erreur avec "cert not issued by Let's Encrypt"

Mon serveur YunoHost

Matériel: VPS acheté en ligne (Gandi)
Version de YunoHost: 3.8.5.9
J’ai accès à mon serveur : En SSH + Par la webadmin + En direct avec une console de restauration
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

Bonjour a tous,

Depuis 2 jours j’ai des avertissements de securite dans mon navigateur comme quoi le certificat Let’s Encrypt sur mon domaine est expire (il y a du avoir un probleme car je croyais que c’etait automatique).

L’interface d’admin le montre bien:

Je cherchais a avoir plus d’infos via la ligne de commande et je voie qu’effectivement le certificat est bien expire:

 $ sudo yunohost domain cert-status
certificates: 
  XXX.YY: 
    CA_type: Other / Unknown
    summary: CRITICAL
    validity: -3

Bon, je me lance pour le renouveler manuellement et la, surprise, YNH me dit que ce certificat n’est pas gere par Let’s Encrypt:

 $ sudo yunohost domain cert-renew XXX.YY --debug
173  DEBUG loading actions map namespace 'yunohost'
190  DEBUG extra parameter classes loaded: ['comment', 'ask', 'password', 'required', 'pattern']
190  DEBUG initializing base actions map parser for cli
192  DEBUG registering new callback action 'yunohost.utils.packages.ynh_packages_version' to ['-v', '--version']
257  DEBUG acquiring lock...
278  DEBUG lock has been acquired
320  DEBUG loading python module yunohost.domain took 0.042s
320  INFO processing action [27255.1]: yunohost.domain.cert-renew with args={'no_checks': False, 'force': False, 'domain_list': ['XXX.YY'], 'staging': False, 'email': False}
344  DEBUG initialize authenticator 'as-root' with: uri='ldapi://%2Fvar%2Frun%2Fslapd%2Fldapi', base_dn='dc=yunohost,dc=org', user_rdn='gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth'
663  DEBUG action [27255.1] executed in 0.342s
664  DEBUG lock has been released
665  ERROR The certificate for the domain 'XXX.YY' is not issued by Let's Encrypt. Cannot renew it automatically!

Est-ce que qqn saurait me dire ce qui se passe ici et comment faire pour regler le probleme? Je n’ai pas trouve mention de cette erreur sur le forum et dans la doc non plus.

Merci bien!

Vincent

PS: il y a sans doute eu des emails a ce sujet a propos du renouvellement rate avant l’expiration mais ma config mail ne doit pas etre bonne (je n’ai pas mes emails heberges via YNH). Comment trouver trace de ces messages sur disque?

Tu as essayé de revenir sur de l’auto-signé et ensuite de revenir sur let’s encrypt ?
(avec cert-install au lieu de cert-renew ? Et chez moi j’ai du parfois le faire avec --no-checks en plus pour le forcer)

Je ferais ça aussi.

C’est un probleme connu dans la 3.8 du au fait que des choses ont changé chez Let’s Encrypt depuis. Yunohost pense que ce n’est pas un certif Let’s Encrypt mais c’en est bel et bien un. Pendant le renouvellement, il dira aussi qu’il n’a pas pu installer le nouveau certif mais c’est bon quand même.

Il faut tout de meme que tu le declenche avec yunohost domain cert-renew --force ou un truc du genre.

Le probleme est resolu en 4.x

@Mamie, @charly @Aleks

Merci a tous pour vos reponses rapides!

En revenant sur le certificat auto-signe, puis en regenerant un nouveau certificat Let’s Encrypt, le probleme a ete resolu (j’ai effectivement eu une erreur lors de l’installation, content de voir que le probleme est resolu en 4.x).

Repasser sur l’auto-signe:

$ sudo yunohost domain cert-install XXX.YY --self-signed
Success! Configuration updated for 'nginx'
Success! Self-signed certificate now installed for the domain 'XXX.YY'

Regenerer le certificat Let’s Encrypt:

$ sudo yunohost domain cert-install XXX.YY
Info: Now attempting install of certificate for domain XXX.YY!
Success! Configuration updated for 'dnsmasq'
Info: Parsing account key...
Info: Parsing CSR...
Info: Found domains: XXX.YY
Info: Getting directory...
Info: Directory found!
Info: Registering account...
Info: Registered!
Info: Creating new order...
Info: Order created!
Info: Verifying XXX.YY...
Info: XXX.YY verified!
Info: Signing certificate...
Info: Certificate signed!
Success! Configuration updated for 'nginx'
Error: Certificate installation for XXX.YY failed !
Exception: Trying to use the new certificate for XXX.YY did not work...
Info: The operation 'Install a Let's Encrypt certificate on 'XXX.YY' domain' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20210401-203259-letsencrypt_cert_install-XXX.YY --share' to get help

En avant maintenant vers la MAJ 4.x !

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