Hello
I am a beginner with let's encrypt, and just install on my server. But I got this error about utf8
"UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 436: invalid continuation byte"
Extract from /var/log/letsencrypt/letsencrypt.log
Saving debug log to /var/log/letsencrypt/letsencrypt.log
An unexpected error occurred:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 436: invalid continuation byte
Please see the logfiles in /var/log/letsencrypt for more details.
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
An unexpected error occurred:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 436: invalid continuation byte
Please see the logfiles in /var/log/letsencrypt for more details.
My web server is (include version): debian10
The operating system my web server runs on is (include version): nginx 1.14.2
My hosting provider, if applicable, is: me
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 0.31.0
So, the problem is that your nginx config has some bytes in it which aren't valid UTF-8 characters. This may not be causing other problems, but it's certainly weird and is preventing certbot from understanding your config. So, you should probably find that byte, figure out what the configuration there should be, and fix it.
If you can't do that, then there are other ways to configure certbot, where instead of it trying to update your nginx configuration, you can tell it a "webroot" to place a file, where nginx is already configured to serve those files.
I'm not particularly familiar with nginx configuration myself (though many other people here are), but I'm guessing it's whichever file has "byte 0xe9 in position 436" and probably shouldn't.
An nginx forum or its own docs are best places to learn about nginx. And, nginx can be installed in non-standard places. But, your initial conf file is probably here:
/etc/nginx/nginx.conf
That conf file probably includes other folders with conf files so you can follow those manually.
Normally you can see the whole nginx config with: sudo nginx -T
(uppercase T)
But, this may not work when there are errors in the config
In this case it looks like the character may be an accented e
Still, see the Certbot docs for instructions on using --webroot method. That may be needed in your case instead of --nginx method.
And, your Certbot version (and nginx version) are very old. Debian 10 is also now end of life. Updating at least Certbot may help.
Older versions of Certbot had a series of bugs where they would not work properly with foreign-language characters (like àèìòùäëïöü etc.), which might be mentioned in configuration files especially in comments like
# Esse é um comentário em português
# Ceci est un commentaire en français
All of these bugs were fixed in newer versions of Certbot over the past few years, but some people are still using very old versions of Certbot. Version 0.31.0 is a very old version.
Using such an old version usually means that you installed it from an operating system package that's not being kept up to date by the operating system maintainers (which is common on Debian, unfortunately!). If you check
you can find recommended installation methods for different operating systems, which, if followed, will get you a newer version of Certbot which shouldn't have this bug.
Yes I've already checked my nginx.conf file, I didn't find any é neitheir in the VHost file.
So I supposed I need to upgrade my debian10 to bookworm...