Unicodedecode utf 8 error

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:life-at-sea.net

I ran this command: sudo certbot --nginx -d life-at-sea.net -d www.life-at-sea.net

It produced this output:unicodedecode error: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte

My web server is (include version):nginx 1.18.0

The operating system my web server runs on is (include version):ubuntu server 20.04.1 LTS

My hosting provider, if applicable, is:self

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):certbot version 0.40.0

I have tried to use the grep command: grep -RP "\x92" /etc/nginx/ but this gave no result back.
utf language is: c.utf-8

This how far i came, can somebody help me?

1 Like

Hi @edgar

check the certbot config files too.

1 Like

Welcome to the Let's Encrypt Community :slightly_smiling_face:

It sounds like one of the files used by certbot has some unrecognized characters. What is the whole error message? Try adding -vvv to your certbot command then running it again to get more detailed output.

1 Like

uhmmm where can i find those files?

2 Likes

complete error message;

2020-11-13 14:46:37,238:DEBUG:certbot.main:certbot version: 0.40.0
2020-11-13 14:46:37,239:DEBUG:certbot.main:Arguments: ['--nginx', '-d', 'life-at-sea.net', '-d', 'www.life-at-sea.net']
2020-11-13 14:46:37,239:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-11-13 14:46:37,243:DEBUG:certbot.log:Root logging level set at 20
2020-11-13 14:46:37,243:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-11-13 14:46:37,244:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx
2020-11-13 14:46:37,308:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in
load_entry_point('certbot==0.40.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run
installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose_configurator_plugins
authenticator = installer = pick_configurator(config, req_inst, plugins)
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick_configurator
return pick_plugin(
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick_plugin
verified.prepare()
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare
self._initialized.prepare()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 195, in prepare
self.parser = parser.NginxParser(self.conf('server-root'))
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 38, in init
self.load()
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 45, in load
self._parse_recursively(self.config_root)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 57, in _parse_recursively
trees = self._parse_files(filepath)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 207, in _parse_files
parsed = nginxparser.load(_file)
File "/usr/lib/python3/dist-packages/certbot_nginx/nginxparser.py", line 123, in load
return loads(_file.read())
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte
2020-11-13 14:46:37,314:ERROR:certbot.log:An unexpected error occurred:
2020-11-13 14:55:49,549:DEBUG:certbot.main:certbot version: 0.40.0
2020-11-13 14:55:49,549:DEBUG:certbot.main:Arguments: ['--nginx', '-d', 'life-at-sea.net', '-d', 'www.life-at-sea.net']
2020-11-13 14:55:49,549:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-11-13 14:55:49,583:DEBUG:certbot.log:Root logging level set at 20
2020-11-13 14:55:49,583:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-11-13 14:55:49,584:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx
2020-11-13 14:55:49,650:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in
load_entry_point('certbot==0.40.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run
installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose_configurator_plugins
authenticator = installer = pick_configurator(config, req_inst, plugins)
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick_configurator
return pick_plugin(
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick_plugin
verified.prepare()
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare
self._initialized.prepare()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 195, in prepare
self.parser = parser.NginxParser(self.conf('server-root'))
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 38, in init
self.load()
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 45, in load
self._parse_recursively(self.config_root)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 57, in _parse_recursively
trees = self._parse_files(filepath)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 207, in _parse_files
parsed = nginxparser.load(_file)
File "/usr/lib/python3/dist-packages/certbot_nginx/nginxparser.py", line 123, in load
return loads(_file.read())
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte
2020-11-13 14:55:49,680:ERROR:certbot.log:An unexpected error occurred:
2020-11-13 15:18:07,000:DEBUG:certbot.main:certbot version: 0.40.0
2020-11-13 15:18:07,000:DEBUG:certbot.main:Arguments: ['--nginx', '-d', 'life-at-sea.net', '-d', 'www.life-at-sea.net']
2020-11-13 15:18:07,000:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-11-13 15:18:07,004:DEBUG:certbot.log:Root logging level set at 20
2020-11-13 15:18:07,005:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-11-13 15:18:07,005:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx
2020-11-13 15:18:07,070:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in
load_entry_point('certbot==0.40.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run
installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose_configurator_plugins
authenticator = installer = pick_configurator(config, req_inst, plugins)
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick_configurator
return pick_plugin(
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick_plugin
verified.prepare()
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare
self._initialized.prepare()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 195, in prepare
self.parser = parser.NginxParser(self.conf('server-root'))
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 38, in init
self.load()
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 45, in load
self._parse_recursively(self.config_root)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 57, in _parse_recursively
trees = self._parse_files(filepath)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 207, in _parse_files
parsed = nginxparser.load(_file)
File "/usr/lib/python3/dist-packages/certbot_nginx/nginxparser.py", line 123, in load
return loads(_file.read())
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte
2020-11-13 15:18:07,071:ERROR:certbot.log:An unexpected error occurred:
2020-11-13 15:20:00,943:DEBUG:certbot.main:certbot version: 0.40.0
2020-11-13 15:20:00,943:DEBUG:certbot.main:Arguments: ['--nginx', '-d', 'life-at-sea.net', '-d', 'www.life-at-sea.net']
2020-11-13 15:20:00,943:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-11-13 15:20:00,948:DEBUG:certbot.log:Root logging level set at 20
2020-11-13 15:20:00,948:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-11-13 15:20:00,948:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx
2020-11-13 15:20:01,012:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in
load_entry_point('certbot==0.40.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run
installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose_configurator_plugins
authenticator = installer = pick_configurator(config, req_inst, plugins)
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick_configurator
return pick_plugin(
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick_plugin
verified.prepare()
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare
self._initialized.prepare()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 195, in prepare
self.parser = parser.NginxParser(self.conf('server-root'))
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 38, in init
self.load()
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 45, in load
self._parse_recursively(self.config_root)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 57, in _parse_recursively
trees = self._parse_files(filepath)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 207, in _parse_files
parsed = nginxparser.load(_file)
File "/usr/lib/python3/dist-packages/certbot_nginx/nginxparser.py", line 123, in load
return loads(_file.read())
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte
2020-11-13 15:20:01,013:ERROR:certbot.log:An unexpected error occurred:
2020-11-13 15:32:38,682:DEBUG:certbot.main:certbot version: 0.40.0
2020-11-13 15:32:38,682:DEBUG:certbot.main:Arguments: ['--nginx', '-d', 'life-at-sea.net', '-d', 'www.life-at-sea.net']
2020-11-13 15:32:38,682:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-11-13 15:32:38,687:DEBUG:certbot.log:Root logging level set at 20
2020-11-13 15:32:38,687:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-11-13 15:32:38,687:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx
2020-11-13 15:32:38,752:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in
load_entry_point('certbot==0.40.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run
installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose_configurator_plugins
authenticator = installer = pick_configurator(config, req_inst, plugins)
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick_configurator
return pick_plugin(
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick_plugin
verified.prepare()
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare
self._initialized.prepare()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 195, in prepare
self.parser = parser.NginxParser(self.conf('server-root'))
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 38, in init
self.load()
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 45, in load
self._parse_recursively(self.config_root)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 57, in _parse_recursively
trees = self._parse_files(filepath)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 207, in _parse_files
parsed = nginxparser.load(_file)
File "/usr/lib/python3/dist-packages/certbot_nginx/nginxparser.py", line 123, in load
return loads(_file.read())
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte
2020-11-13 15:32:38,753:ERROR:certbot.log:An unexpected error occurred:
2020-11-13 15:48:13,598:DEBUG:certbot.main:certbot version: 0.40.0
2020-11-13 15:48:13,598:DEBUG:certbot.main:Arguments: ['--nginx', '-d', 'life-at-sea.net', '-d', 'www.life-at-sea.net']
2020-11-13 15:48:13,598:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-11-13 15:48:13,602:DEBUG:certbot.log:Root logging level set at 20
2020-11-13 15:48:13,602:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-11-13 15:48:13,603:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx
2020-11-13 15:48:13,668:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in
load_entry_point('certbot==0.40.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run
installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose_configurator_plugins
authenticator = installer = pick_configurator(config, req_inst, plugins)
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick_configurator
return pick_plugin(
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick_plugin
verified.prepare()
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare
self._initialized.prepare()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 195, in prepare
self.parser = parser.NginxParser(self.conf('server-root'))
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 38, in init
self.load()
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 45, in load
self._parse_recursively(self.config_root)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 57, in _parse_recursively
trees = self._parse_files(filepath)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 207, in _parse_files
parsed = nginxparser.load(_file)
File "/usr/lib/python3/dist-packages/certbot_nginx/nginxparser.py", line 123, in load
return loads(_file.read())
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte
2020-11-13 15:48:13,669:ERROR:certbot.log:An unexpected error occurred:
2020-11-13 16:26:03,144:DEBUG:certbot.main:certbot version: 0.40.0
2020-11-13 16:26:03,145:DEBUG:certbot.main:Arguments:
2020-11-13 16:26:03,145:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-11-13 16:26:03,149:DEBUG:certbot.log:Root logging level set at 20
2020-11-13 16:26:03,149:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-11-13 17:35:25,495:DEBUG:certbot.main:certbot version: 0.40.0
2020-11-13 17:35:25,495:DEBUG:certbot.main:Arguments: ['-vvv', '--nginx', '-d', 'life-at-sea.net', '-d', 'www.life-at-sea.net']
2020-11-13 17:35:25,495:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2020-11-13 17:35:25,500:DEBUG:certbot.log:Root logging level set at -10
2020-11-13 17:35:25,500:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2020-11-13 17:35:25,501:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx
2020-11-13 17:35:25,566:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in
load_entry_point('certbot==0.40.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1382, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 1115, in run
installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 223, in choose_configurator_plugins
authenticator = installer = pick_configurator(config, req_inst, plugins)
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 22, in pick_configurator
return pick_plugin(
File "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", line 105, in pick_plugin
verified.prepare()
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in prepare
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 252, in
return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
File "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", line 130, in prepare
self._initialized.prepare()
File "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", line 195, in prepare
self.parser = parser.NginxParser(self.conf('server-root'))
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 38, in init
self.load()
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 45, in load
self._parse_recursively(self.config_root)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 67, in _parse_recursively
self._parse_recursively(subentry[1])
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 57, in _parse_recursively
trees = self._parse_files(filepath)
File "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", line 207, in _parse_files
parsed = nginxparser.load(_file)
File "/usr/lib/python3/dist-packages/certbot_nginx/nginxparser.py", line 123, in load
return loads(_file.read())
File "/usr/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 1150: invalid start byte
2020-11-13 17:35:25,579:ERROR:certbot.log:An unexpected error occurred:

1 Like

Check the documentation

https://certbot.eff.org/docs/using.html#configuration-file

Other solution: Use --webroot, may be first with certonly. Then the nginx config file isn't parsed.

If you don't have the error, you know it's a problem with your nginx. There is somewhere a wrong character / a file with a one-byte encoding and a non-ASCII character.

If you have the problem again, the error is in your Certbot config.

1 Like

JuergenAuer has made an excellent suggestion to divide and conquer. Given the output, I strongly suspect the problem is in your nginx configuration files. If the webroot authenticator works, give us the output of nginx -T (with three backticks ``` alone on the lines above and below the output to make it clear).

1 Like

the message it gave

1 Like

As far as i understand this is all chinese for me.

1 Like

I am trying to follow but this is not the way i understand

1 Like

You forgot to specify the actual webroot folder. :slightly_smiling_face:

Try this:
sudo certbot certonly --webroot -w /var/www/html -d "life-at-sea.net,www.life-at-sea.net" --dry-run -vvv

1 Like

It looks like i dont get the error anymore

1 Like

From the command I just gave?

1 Like

1 Like

So I've got some news for you...

I highly recommend enabling Full SSL (strict). Otherwise, Cloudflare uses their certificate from your visitors to Cloudflare then your certificate from Cloudflare to your server. Do you use load balancing?

If you do want to use Cloudflare's certificate, there is a much better way of managing your certificates than certbot: use a Cloudflare Origin CA. They last MUCH longer than a Let's Encrypt certificate and are easy to manage in Cloudflare's software.

1 Like

I get a 403 Forbidden for:

http://life-at-sea.net/.well-known/acme-challenge/test

HSTS preload header present. No redirect to HTTPS?


I get a 522 Connection Timed Out for:

https://life-at-sea.net/.well-known/acme-challenge/test

http://www.life-at-sea.net/.well-known/acme-challenge/test ->
https://www.life-at-sea.net/.well-known/acme-challenge/test

These should be 404 Not Found.

1 Like

correct at the moment busy with the cloudflare certificate.

1 Like

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