Rahul
Rahul

Reputation: 420

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 ?

Upvotes: 4

Views: 10385

Answers (3)

Tejas Tank
Tejas Tank

Reputation: 1206

I am apache2 lover, here is solution

certbot renew --cert-name www.snippetbucket.com --pre-hook "service apache2 stop" --post-hook "service apache2 start"

Makes more simple and works 100%.

Now, with all domain reference on apache hosted server, automated process.

certbot renew --pre-hook "service apache2 stop" --post-hook "service apache2 start"

Advice: In case automated not works, just schedule renew process in advance according server low traffic.

Upvotes: -1

Matt
Matt

Reputation: 137

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"

Upvotes: 12

rrmerugu
rrmerugu

Reputation: 1886

Just stop your webserver and run the same again. If you are using nginx use sudo service nginx stop

Upvotes: 5

Related Questions