2016-10-27 118 views
0

我正在使用certbot-auto生成證書https作爲我的域名。我用命令這樣證書沒有到期續訂,但模擬更新爲空運行

sudo ./certbot-auto 

它的確定,但是當我再次證書使用命令

sudo ./certbot-auto renew --dry-run 

它不能更新證書,並顯示錯誤信息象下面這樣:

/root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6 
    DeprecationWarning 
Saving debug log to /var/log/letsencrypt/letsencrypt.log 

------------------------------------------------------------------------------- 
Processing /etc/letsencrypt/renewal/example.asia.conf 
------------------------------------------------------------------------------- 
Cert not due for renewal, but simulating renewal for dry run 
Starting new HTTPS connection (1): acme-staging.api.letsencrypt.org 
Renewing an existing certificate 
Performing the following challenges: 
tls-sni-01 challenge for example.asia 
tls-sni-01 challenge for www.example.asia 
Waiting for verification... 
Cleaning up challenges 
Generating key (2048 bits): /etc/letsencrypt/keys/0020_key-certbot.pem 
Creating CSR: /etc/letsencrypt/csr/0020_csr-certbot.pem 
** DRY RUN: simulating 'certbot renew' close to cert expiry 
**   (The test certificates below have not been saved.) 

Congratulations, all renewals succeeded. The following certs have been renewed: 
    /etc/letsencrypt/live/example.asia/fullchain.pem (success) 
** DRY RUN: simulating 'certbot renew' close to cert expiry 
**   (The test certificates above have not been saved.) 

請幫助我

+0

究竟是什麼錯誤? '--dry-run'是爲了模擬更新(它實際上並沒有更新證書)。您似乎已於昨天更新了證書(星期三,2016年10月26日02:49:00),並且該證書在另外3個月內不會過期。要更新證書,您不會使用'--dry-run'選項。 –

+0

我們用於更新的命令是什麼?請告訴我 –

+0

@AnandBhat,對不起,先生,我可以在到期3個月之前續證嗎?過期3個月後我可以使用這個命令sudo ./certbot-auto renew --quiet for renew?可以嗎? –

回答

2

您在您的問題sudo ./certbot-auto renew --dry-run中運行的命令用於測試續訂。正如你的日誌所表明的,一切順利,測試成功了。

當您希望更新證書時,運行sudo ./certbot-auto renew --quiet將起作用。您可以在證書過期不到30天或已過期的情況下續簽證書。

更多詳細信息可在Certbot documentationCertbot userguide中找到。

+0

非常感謝! ./certbot-auto renew - 安靜不適合我。我使用sudo ./certbot-auto renew --force-renew是好的。但是當我使用crontab -e * 15 * * */certbot-auto更新--force-renew它有這樣的錯誤:引導基於RedHat的操作系統的依賴關係... yum是/ usr/bin/yum 要使用Certbot,需要安裝EPEL存儲庫中的軟件包。 請啓用此存儲庫並再次運行Certbot。如果知道解決方案,請幫助我 –