Letsencrypt certificate renewals have been silently failing for a while, none of the existing solutions worked for me and I think I may have found the reason (though it's a tricky problem to reproduce on demand so time will tell). This is quite a serious problem because it can effectively cause random downtime for any site on the server.
So, the earlier solutions suggest installing packages certbot, python-certbot-apache and socat then "restarting everything". None of that made any difference to me (on CentOS or Ubuntu) .
What did help was trying "systemctl start certbot.service", which threw up errors. These errors were all related to sites that used to exist on the server but had long since been removed (or disabled). I grepped and deleted all reference to the domains in question in /etc/letsencrypt but the error messages were still there. However after rebooting the whole server they went away.
Except there were still errors, but this time for a different set of domains. Rinse, lather, repeat a few times and now the service starts without errors. Fingers crossed that has solved the problem on that server.
So, there seem to be two problems:
Hi, Phil.
Thanks for contacting us.
This is a known and already addressed issue, which will be fixed in upcoming Virtualmin 6.15 release.
Meanwhile, have a look at this thread for getting an immediate fix.
We'd recommend disabling all other cron jobs or services performing certificate auto renew, as it's solely handled by Webmin/Virtualmin.