VPS侦探论坛

 找回密码
 注册
查看: 5731|回复: 5

安装Let's Encrypt出错求解决方法

[复制链接]
发表于 2017-3-23 12:02:42 | 显示全部楼层 |阅读模式

按https://www.vpser.net/build/letsencrypt-certbot.html
最后报错求如果解决
安装完提示

Cleaning up challenges
An unexpected error occurred:
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' in position 194: ordinal not in range(128)
Please see the logfiles in /var/log/letsencrypt for more details.

IMPORTANT NOTES:
- Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.












安装日志提示

2017-03-23 03:52:05,471:INFO:certbot.auth_handler:Cleaning up challenges
2017-03-23 03:52:05,471EBUG:certbot.plugins.webroot:Removing /data/www/i.tianqi.com/.well-known/acme-challenge/gyPR7j4bRKAKC8YMmJUm-OLd-uOeYC3cvXcjm2D_ng0
2017-03-23 03:52:05,472EBUG:certbot.plugins.webroot:Removing /data/www/i.tianqi.com/.well-known/acme-challenge/bK6eJeEdwv-G15-fguuzHAKHxPzgzB4nj55axwDQ6Xg
2017-03-23 03:52:05,474EBUG:certbot.plugins.webroot:All challenges cleaned up, removing /data/www/i.tianqi.com/.well-known/acme-challenge
2017-03-23 03:52:05,476EBUG:certbot.main:Exiting abnormally:
Traceback (most recent call last):
  File "/root/.local/share/letsencrypt/bin/letsencrypt", line 11, in <module>
    sys.exit(main())
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/main.py", line 896, in main
    return config.func(config, plugins)
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/main.py", line 692, in certonly
    lineage = _get_and_save_cert(le_client, config, domains, certname, lineage)
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/main.py", line 92, in _get_and_save_cert
    lineage = le_client.obtain_and_enroll_certificate(domains, certname)
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/client.py", line 294, in obtain_and_enroll_certificate
    certr, chain, key, _ = self.obtain_certificate(domains)
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/client.py", line 265, in obtain_certificate
    self.config.allow_subset_of_names)
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/auth_handler.py", line 77, in get_authorizations
    self._respond(resp, best_effort)
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/auth_handler.py", line 134, in _respond
    self._poll_challenges(chall_update, best_effort)
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/auth_handler.py", line 197, in _poll_challenges
    _report_failed_challs(all_failed_achalls)
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/auth_handler.py", line 488, in _report_failed_challs
    _generate_failed_chall_msg(achalls), reporter.MEDIUM_PRIORITY)
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/certbot/auth_handler.py", line 504, in _generate_failed_chall_msg
    if messages.is_acme_error(error):
  File "/root/.local/share/letsencrypt/lib/python2.6/site-packages/acme/messages.py", line 39, in is_acme_error
    return (ERROR_PREFIX in str(err)) or (OLD_ERROR_PREFIX in str(err))
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' in position 194: ordinal not in range(128)
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-3-23 14:02:39 | 显示全部楼层

回复 1# 的帖子



好像是编码问题,你设置强制编码或者虚拟主机上有什么特别的设置?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-3-23 14:05:44 | 显示全部楼层

我是用securecrt链接 设置编码utf8
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-3-23 15:08:33 | 显示全部楼层



发现是要升级Python需要2.7版本以上 不过上级了 还是报2.6错误 无奈啊
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-3-24 09:59:39 | 显示全部楼层

原帖由 cyr11 于 2017-3-23 15:08 发表
发现是要升级Python需要2.7版本以上 不过上级了 还是报2.6错误 无奈啊
我用的centos6系统,提前升级python2.6到2.7了,安装证书的时候还是提示2.6版本过低,同样的遭遇

军哥运维代购:http://shop63846532.taobao.com/

发表于 2017-3-24 14:06:39 | 显示全部楼层

回复 4# 的帖子


按日志上的信息是和编码有关系,2.6虽然是低,但是目前还是可以用的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-27 12:16 , Processed in 0.027334 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表