UnicodeEncodeError: ‘ascii’ codec can’t encode character … |
Article original Publié le : 12 mai 2020 Mise a jour le : – |
Le dernier renouvellement de mon certificat a échoué, l’erreur semble du a un problème d’encodage dans un fichier de conf.
...
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for it.izero.fr
Cleaning up challenges
An unexpected error occurred:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 307: ordinal not in range(128)
Please see the logfiles in /var/log/letsencrypt for more details.
Rechercher rapidement avec un grep et spécifier les répertoires pour trouver le fichier qui pose problème.
# grep -RPn "[^\x00-\x7f]" /etc/letsencrypt /etc/nginx/
/etc/nginx/nginx.conf:13: # Bloquer les spammeurs et les visiteurs indésirables
Le problème est dans le fichier nginx.conf, dans une ligne commenté !
Après suppression, la renouvellement est passé.
... IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/it.izero.fr/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/it.izero.fr/privkey.pem Your cert will expire on 2020-08-08. To obtain a new or tweaked version of this certificate in the future, simply run certbot-auto again with the "certonly" option. To non-interactively renew *all* of your certificates, run "certbot-auto renew" - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
Syntaxe de la commande a garder sous la main ..
Source: https://community.letsencrypt.org/t/certbot-ascii-codec-can-t-encode-character-u2502-in-position-550/83325