UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)


#1

Please fill out the fields below so we can help you better.

My domain is:

ajt-co.com

I ran this command:

/root/letsencrypt/letsencrypt-auto --text certonly --renew-by-default --webroot --webroot-path /home/teedaco/public_html/ajtdashco.​com/ -d ajt-co.com -d www.ajt-co.com

It produced this output:

2016-06-28 12:29:44,133:ERROR:certbot.error_handler:Encountered exception during recovery
2016-06-28 12:29:44,133:ERROR:certbot.error_handler:‘ascii’ codec can’t decode byte 0xe2 in position 36: ordinal not in range(128)
Traceback (most recent call last):
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/certbot/error_handler.py”, line 74, in call_registered
self.funcs-1
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/certbot/auth_handler.py”, line 266, in _cleanup_challenges
self.auth.cleanup(achalls)
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/certbot/plugins/webroot.py”, line 222, in cleanup
validation_path = self._get_validation_path(root_path, achall)
File “/root/.local/share/letsencrypt/lib/python2.7/site-packages/certbot/plugins/webroot.py”, line 196, in _get_validation_path
return os.path.join(root_path, achall.chall.encode(“token”))
File “/root/.local/share/letsencrypt/lib64/python2.7/posixpath.py”, line 73, in join
path += ‘/’ + b
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 36: ordinal not in range(128)
An unexpected error occurred:
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 36: ordinal not in range(128)

My operating system is (include version):

CloudLinux Server release 6.8

My web server is (include version):

Server version: Apache/2.2.31 (Unix)

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):

cPanel


#2

Huh, that is pretty odd! Do you have (or are you trying to use) any internationalized domain names (domains that contain non-ASCII characters, such as an accented character (åáäàą, etc.) or non-Latin character (like Ж, ξ, ל, or ツ)?

Is it possible that such a character was ever included in any part of your account name, e-mail address, webroot path, or some other part of your system configuration?


#3

Its extremely odd indeed.

I’ve generated plenty of SSL’s on this server for other domains, it seems to only be this domain that is having issues. There are no special characters outside a dash in the domain name:

/root/letsencrypt/letsencrypt-auto --text certonly --renew-by-default --webroot --webroot-path /home/teedaco/public_html/ajtdashco.​com/ -d ajt-co.com -d www.ajt-co.com

There was a dash in the path but I renamed the folder to remove the dash and still no go.


#4

There’s a zero-width whitespace character (U+200B) between . and com in /home/teedaco/public_html/ajtdashco.​com/.

Yay unicode! :smile:

Neat tool to find issues like that: https://r12a.github.io/uniview/


#5

Wow man awesome find, it was actually like that in Apache conf! I just retyped it out by hand, no copy pasting and check it:

drwxr-xr-x 2 teedaco teedaco 4.0K Jun 28 21:12 ajt-co.com/
drwxr-xr-x 5 teedaco teedaco 4.0K Jun 28 21:06 ajt-co.​com/

Never seen that before! Thanks again!


#6

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