Unattended, it seems certbot is killing nginx as part of the renewal process, failing to start nginx, the renewal fails because the challenge doesn't work, and nginx remains dead.
journalctl for snap.certbot.renew.service:
Sep 09 19:26:01 tanager systemd[1]: Starting Service for snap application certbot.renew...
Sep 09 19:30:21 tanager certbot.renew[121392]: Failed to renew certificate www.campcomputer.com with error: Some challenges have failed.
Sep 09 19:30:21 tanager certbot.renew[121392]: The following renewals failed:
Sep 09 19:30:21 tanager certbot.renew[121392]: /etc/letsencrypt/live/www.campcomputer.com/fullchain.pem (failure)
Sep 09 19:30:21 tanager certbot.renew[121392]: 1 renew failure(s), 0 parse failure(s)
Sep 09 19:30:21 tanager systemd[1]: snap.certbot.renew.service: Main process exited, code=exited, status=1/FAILURE
Sep 09 19:30:21 tanager systemd[1]: snap.certbot.renew.service: Failed with result 'exit-code'.
Sep 09 19:30:21 tanager systemd[1]: Failed to start Service for snap application certbot.renew.
journlctl for nginx.service:
Sep 09 19:30:19 tanager systemd[1]: nginx.service: Main process exited, code=dumped, status=11/SEGV
Sep 09 19:30:19 tanager systemd[1]: nginx.service: Killing process 126706 (nginx) with signal SIGKILL.
Sep 09 19:30:19 tanager systemd[1]: nginx.service: Killing process 126707 (nginx) with signal SIGKILL.
Sep 09 19:30:19 tanager systemd[1]: nginx.service: Killing process 126706 (nginx) with signal SIGKILL.
Sep 09 19:30:19 tanager systemd[1]: nginx.service: Killing process 126707 (nginx) with signal SIGKILL.
Sep 09 19:30:19 tanager systemd[1]: nginx.service: Failed with result 'core-dump'.
Sep 09 19:43:20 tanager systemd[1]: nginx.service: Unit cannot be reloaded because it is inactive.
Sep 09 19:43:29 tanager systemd[1]: Starting A high performance web server and a reverse proxy server...
Sep 09 19:43:29 tanager systemd[1]: Started A high performance web server and a reverse proxy server.
My alerting tells me the site is down and I login and restart nginx and the site comes back up.:
sudo systemctl restart nginx
I was previously on an earlier Ubuntu LTS running the non-snap certbot. I followed the certbot install instructions after upgrading to 20.04 and I believe fully uninstalled the obsolete certbot before these errors started.
I can't recall perfectly, but I regularly have to log in, manually kick certbot and nginx around with systemctl restarts, and eventually certificates renew and nginx is back in business, but it's certainly not something I enjoy doing.
Any idea what's going on and how to fix it?
Domain: campcomputer.com (among others)
My web server is (include version): nginx version: nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 20.04.2
My hosting provider, if applicable, is: linode VPS
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 1.19.0