Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

renewal of letsencrypt certificate fails

I'm using debain jessie, certbot version 0.9.3-1~bpo8+2. Since last two days I've been started getting this error while renewing certificates for my site.

Could not bind TCP port 443 because it is already in use by another process on
this system (such as a web server). Please stop the program in question and then
try again.
-------------------------------------------------------------------------------
Attempting to renew cert from /etc/letsencrypt/renewal/www.testsite.com.conf produced an unexpected error: object of type 'NoneType' has no len(). Skipping.

What should I do ? I'm not much familiar with Letsencrypt. Anybody please shade light on this ?

like image 656
Rahul Avatar asked Sep 19 '25 03:09

Rahul


1 Answers

I haven't found a way to do this with "zero downtime", but you can auto stop/start nginx with hooks so you can handle renewals with cron:

certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"
like image 163
Matt Avatar answered Sep 21 '25 20:09

Matt