We have the following setup: multiple linux server with Ubuntu 20.04 and 22.04. Hosted on this servers are website for our customers. We using certbot to generate or renewal certificates. As webserver we using nginx.
The certificates are generated with the following command:
certbot --webroot-path /path/to/webroot -d domain.name
For the renewal the following cronjob is executed:
certbot -q --post-hook "service nginx reload" renew'
This setup was working like charm until last year december. But recently the post hook is not working anymore
service nginx reload
So certbot successfully requests the certificate and write the new certificate into the store. But with the reload command the nginx is not using the new certificate.
I debugged the behaviour and all of the following commands are not loading the new certificate:
nginx -t && nginx -s reload
/etc/init.d/nginx reload
systemctl reload nginx
nginx -s reload
nginx -t -q && nginx -s reload
Only a hard restart of the service helps and then the new certificate is used:
systemctl restart nginx
I could not find any information regarding this behaviour. Are there any other admins with the same problem. I would dislike to keep restarting the service. To prevent downtime and interruptions after renewal.