X

Let's encrypt 遇到 'ascii' codec can't decode byte 0xe5 的解法

Let's encrpyt 在更新憑證的時候,遇到下述錯誤訊息:

Attempting to renew cert (example.com) from /etc/letsencrypt/renewal/example.com.conf produced an unexpected error: 'ascii' codec can't decode byte 0xe5 in position 2: ordinal not in range(128). Skipping.

要怎麼解決呢?

Let's encrypt 遇到 'ascii' codec can't decode byte 0xe5 的解法

錯誤訊息主要是這行:

an unexpected error: 'ascii' codec can't decode byte 0xe5 in position 2: ordinal not in range(128)

此篇 UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 2: ordinal not in range(128) 是 0xe7,但是解法都一樣

解法

  1. $ sudo grep -r -P '[^\x00-\x7f]' /etc/apache2 /etc/letsencrypt /etc/nginx
  2. 將看到的內容,全部進去檔案刪除
  3. 刪除這些編碼後,在重新執行 Let's encrypt script 就可以通過囉~
Tsung: 對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.
Related Post