Any updates on letsencrypt certs not renewing automatically?

Check the /var/spool/cron/asterisk file and look for a line similar to 44 1 * * * /usr/sbin/fwconsole certificates --updateall -q 2>&1 >/dev/null toward the top. If it’s missing add it back in. That should restore the functionality… at least until the next time whatever is causing that to get removed happens again.

dobrosavljevic,

Is this cron job created with the creation of a new LE certificate? I have a handful of installations that suffer from this issue too. I just checked a system that reported today that the cert would expire in 19 days. When I checked the system, sure enough, the cron job was missing so I added this to my crontab for the user “asterisk”. The certificate immediately when the cron job ran.

Like many others, I have just been fixing these by hand in a one-off fashion because it is an easier fix than to report it. Thanks for pointing this out and sharing the knowledge!!

Not sure if that line in the crontab is present weather you have an LE cert or not. I just noticed it missing vs other systems that are working just fine so figured it’s as simple as adding it back to fix it on non working systems… at least hopefully temporarily until it disappears again for whatever reason.

This happened over a year ago on all our deployments. The cronjob to renew certificates had disappeared. We never figured out why and Sangoma wasn’t able to figure out why either. I suspect a bad update… Then it worked and renewed certificates fine 2-3 times during that year and recently all deployments are having this issue. Once again it’s the same issue, the cronjob has simply disappeared.

The cronjob is configured when certman is installed so here’s the quickest way to fix it
fwconsole ma downloadinstall certman --force
fwconsole certificates --updateall
fwconsole reload

We’ll see in 90 days if something breaks it again…

We just had this break at another deployment.

Update the /var/spool/cron/asterisk file and see how long before it breaks again.

Simple fix, make it ‘immutable’.

chattr +i /var/spool/cron/asterisk