現役プログラマのWordPressカスタマイズ相談

WordPress(ワードプレス)のお悩み、うまくいかなくてお困りなこと、不具合調査、新規制作依頼まで、ウェブアプリケーションエンジニアがあなたをサポートします。

certbot-autoで「UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8」エラー

f:id:jsaz:20190404230939p:plain

certbot-auto でlet's encrypt の無料SSLを更新する際に下記のようなエラーが発生した

Cert is due for renewal, auto-renewing...
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for <example>.com
Cleaning up challenges
An unexpected error occurred:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 5: ordinal not in range(128)
Please see the logfiles in /var/log/letsencrypt for more details.

日本語マルチバイト文字が原因らしい。

SSL関連で日本がは使っていないけど。。。と調べてみると、nginxの設定ファイルが対象とのこと。nginxのconfファイルを見てみるとコメントに日本語があった。

コメントは無くても問題なかったので日本語の行をすべて削除。

再度 sudo certbot-auto を実行すると無事SSLが更新された

参考にさせてもらいました。

troches.jp