OK good, by the way you probably don’t need cert.pem in that list you’re handing to “cat”, because the certificate from cert.pem is already at the start of the next file, fullchain.pem, but if it’s not hurting anything, why change it.
If you want to check you fixed the unwanted renewals problem, you could wait a few days and check https://crt.sh/?q=gitlab.typoworx.de to see if there are new certificates still being issued for that name.
Thanks for the hint about combined.pem. I will check later if skipping cert.pem works fine for HaProxy. With the refreshed combined.pem the given domain also runs like a charm now.
I’ve completly rewritten the cron.d/certbot delivered originally by the deb-package. Sine yesterday it seems to run fine without bugging the cert-server with daily renewals. I hope the automated renewal for combined.pem also works.
That is really crappy. What could went wrong here? I am running the cron every day, but isn’t it certbots task to check which of the already created cert needs a renewal using it as described above?
Yes, I think there is a flag named --force-renewal which overrides the default behaviour, but unless that’s used Certbot’s renew mode is supposed to check whether a certificate needs renewing (is 60+ days old) and if not, ignore it.
To understand what’s going wrong I recommend ensuring you will receive the output of the scheduled job (e.g. by email or in a text file) and perhaps also increasing the verbosity (-v on the command line) to give more details of what it’s doing and why. This might give you (or someone reviewing here on the community site) an insight.
A further things to consider, especially if the reviewed output shows nothing is being renewed, and yet a CT monitor like crt.sh shows certificates have been issued anyway, is whether there might be some other “rogue” cron job running as well as the intended one, e.g. in someone’s personal account or in a backup file mistakenly placed in the cron directory. Of course there must be some reason this job doesn’t succeed correctly and stop issuing more and more certificates, but if it’s a rogue job rather than the one you expect, it might have some permission problem or even a left over use of the “force-renewal” flag from some earlier experiment.
As @tialaramex said, seems you have another cron job out there renewing your cert every day. As you installed certbot using the debian package it is worth to check this post I wrote a few minutes ago because maybe you have an active systemd timer that is trying to renew your cert… but well, it should not renew it if it is not due to renewal yet…
Thank you Sahsanu,
that was the culprit at all! I didn’t know about the systemd-timer at all! I think this is a real problem with the debian-package …
I’ve recently tried to disable the systemd-timer for certbot like this and will keep an eye on it if this resolves the problem at all. I decided not to manually delete the systemd-files as this could cause a re-activation by an upgrade for the certbot-package.
$> systemctl list-timers --all
$> systemctl disable certbot.service
$> systemctl stop certbot.service
(last one already confirms that this service has been disabled yet!)
You should stop/disable the timer not the service. No matter that you have certbot.service stopped and disabled, certbot.timer is still able to execute it so you should stop, disable and even mask the certbot.timer.
Hello,
sorry for keeping you waiting. I was in vacation for the last days. I currently have no idea what else I could do. May be I am going better by replacing the debian-package based certbot with the one offered for manual installation.
I already did every of the mentioned steps to avoid automatic renewal when it’s not ready for renewal yet. My cron-skript always gives me a positive looking feedback on that:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Cert not yet due for renewal
No renewals attempted, so not running post-hook
This is pretty strange because a renew command shouldn’t renew your certs if they are not close to expire, anyway, it doesn’t happen only with gitlab.typoworx.de but also with your other domains (pop3, imap, kunden, etc.) in a random way from 6:30 am to 7:05 am CET so something is launching a command to issue these certs waiting a random wait of minutes.
Please, show the output of the following commands:
If the above commands show files, please issue a cat to those files to view the content.
Show also the content of /etc/letsencrypt/renewal/gitlab.typoworx.de.conf and the output of:
ls -lart /etc/letsencrypt/live/gitlab.typoworx.de/
ls -lart /etc/letsencrypt/archive/gitlab.typoworx.de/
I forgot to say that usually, you don’t issue certs on monday, maybe because your server is down… who knows, I say it because it could be some kind of clue ;). Also, are you sure you only used certbot to issue certs?, I mean, is it possible you tested some other client like acme.sh, getssl, dehydrated, etc.?.
grep -Eril "(certbot|letsencrypt)" /var/spool/
(no result)
No other issuing client should be running. Machine #1 has been recently setup (Debian 8) and is using only Certbot (debian package "Certbot 0.9.3-1~bpo8+1").
I had to renew a bunch of certs manually today as a lot of them where unable to renew since the past few weeks. As far as I noticed everything worked fine without problems.
I think it will get interesting again for the next 1-2 next scheduled weekly renewals.