Certbot gives UnicodeDecodeError

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:
randomsoftware.net

I ran this command:
sudo certbot --apache

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): neil@randomsoftware.net
An unexpected error occurred:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc2 in position 4: invalid continuation byte
Please see the logfiles in /var/log/letsencrypt for more details.

My web server is (include version):
Apache 2.4.18

The operating system my web server runs on is (include version):
Ubuntu 16.04

My hosting provider, if applicable, is:
Digital Ocean

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

Error Log:

File "/usr/lib/python3/dist-packages/certbot/display/ops.py", line 50, in get_email
    force_interactive=True)
  File "/usr/lib/python3/dist-packages/certbot/display/util.py", line 185, in input
    ans = input_with_timeout(message)
  File "/usr/lib/python3/dist-packages/certbot/display/util.py", line 88, in input_with_timeout
    line = rlist[0].readline()
  File "/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc2 in position 4: invalid continuation byte
2018-09-10 09:45:04,011:ERROR:certbot.log:An unexpected error occurred:

Please show:
certbot --version
certbot certificates

root@rsl-wordpress:~# certbot --version && certbot certificates
certbot 0.26.1
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No certs found.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Please show:
grep -Eri 'servername|serveralias' /etc/apache2

root@rsl-wordpress:~# grep -Eri 'servername|serveralias' /etc/apache2
/etc/apache2/mods-available/info.conf:	#  http://servername/server-info (requires that mod_info.c be loaded).
/etc/apache2/mods-available/status.conf:	# with the URL of http://servername/server-status
/etc/apache2/sites-available/000-default.conf.dpkg-dist:	# The ServerName directive sets the request scheme, hostname and port that
/etc/apache2/sites-available/000-default.conf.dpkg-dist:	# redirection URLs. In the context of virtual hosts, the ServerName
/etc/apache2/sites-available/000-default.conf.dpkg-dist:	#ServerName www.example.com

I'm a little unclear on whether the Unicode error relates to the e-mail address that you were entering or to the content of one of your configuration files.

You could check the latter possibility with

grep -nRP '[\x80-\xFF]' /etc/apache2

I've worked it out at various times but this version of the command is from

Do you have any sites configured?

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