Hi, folks. I need some help troubleshooting. For the second straight time, my Let’s Encrypt SSL certificate did not renew automatically. In reading the relevant threads here, I managed each time to renew the certificate by removing the old one and rebuilding the app. I was under the impression that doing this would cause the renewal to happen automatically next time. It did not.
I don’t see any evidence of a cron job running anywhere that tries to renew the certificate. I presume I ought to look in the various places on the host machine, as opposed to inside the Docker container. Do I have that right? crontab -l says “no crontab for root” and I see nothing in /etc/cron*.
As a result, I can’t feel confident whether my server is (1) not attempting to renew the certificate or (2) attempting and failing. Is someone willing to guide me through troubleshooting this?
Unfortunately, since I nuked shared/standalone/{letsencrypt,ssl} in order to provision the certificate anew, I don’t have old logs to look through. How would I at least verify that the cron job is installed so that I can check the logs the next time the system attempts to renew the certificate?
Danke sehr, but I would very much prefer to check the settings to see whether the upcoming renewal is likely to happen. I don’t know how to check those settings, so that is the help I’m asking for now.
Apparently, there should be a cron job. Where is it? I don’t see one listed on my server. Is this not really a cron job, but a scheduled task in Rails?
I saw in /var/discourse/shared/standalone/letsencrypt/acme.sh.log (on the host system) that Discourse checked my SSL certificate and the response was “It’s still valid”, so I suppose that’s evidence that Discourse will attempt to renew the certificate in time.
Now I would like to know how that “cron” job is configured? Is this truly a Linux-level cron job or merely a recurring scheduled task in Rails using something like whenever? Is this something I can examine and check without looking through source code? Could I find this using the Rails console or whatever that is in 2026? (I haven’t worked in Rails in a long time.)
Oh and hey, I have finally learned that this defect came down to an undocumented, not-very-clear, evidently unexpected, magic shortcut. “If it starts with /, then it must be a regex.” I don’t understand the entire context yet, but that’s what it seems to be.
That’s Duck Typing culture for you: wonderful flexibility with the risk that if you don’t write things down, clients are in for a surprise.
It seems like it would be wise to strengthen Pups::ReplaceCommand to check more carefully for whether to looks like a regex or not. Or whatever it’s doing that assumes that it should eval() something instead of treating it as the replacement text.
I presume this falls under the category of Janitorial Work That Nobody Has Time Nor Energy To Do? If someone could point me to some helpful examples of how ReplaceCommand needs to behave, maybe I could donate some time and energy to it.
At least I have a better idea what’s going on, but that knowledge has already started decaying even before I finished writing this sentence.