I can renew my certificate with the le-renew-webroot command, and it reports that all is well, and my certificate is renewed. But it didn’t actually work as evidenced by the fact that I can run the le-renew-webroot command again, and it says my certificate is out of date, it will renew it, and it is successful. Chrome to https://www.slaney.org also reports that the site does not have a valid certificate. This worked when I first set it up, but I can’t seem to renew.
Help?
Thanks.
– Malcolm
Please fill out the fields below so we can help you better.
I ran this command: sudo /usr/local/sbin/le-renew-webroot
It produced this output:
Checking expiration date for slaney.org…
The certificate for slaney.org is about to expire soon. Starting webroot renewal script…
IMPORTANT NOTES:
Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/slaney.org-0002/fullchain.pem. Your cert will
expire on 2016-10-09. To obtain a new or tweaked version of this
certificate in the future, simply run letsencrypt-auto again. To
non-interactively renew all of your certificates, run
"letsencrypt-auto renew"
@cool110 it does say right in that output "reloading nginx configuration", so probably yes?
This part suggests your system has at least two different certificates issued for slaney.org and it is possible that your server is using one, while the renewals are occurring for a different one
Check whether the nginx configuration mentions the same file as the renewal message, and it'd also be worth figuring out why you have two (or more) certificate hierarchies, which could involve remembering back to when you first signed up to Let's Encrypt and maybe experiments you abandoned while figuring out how to use it.
It’s normal for there to be two certificates in fullchain.pem, that’s not a problem. The “full chain” consists of the certificate you asked for from Let’s Encrypt, plus an “intermediate” certificate which was issued to Let’s Encrypt by a root CA, proving they’re trusted to issue your certificate. That intermediate certificate is signed by a “root” and people’s web browsers, operating systems etc. know only about the roots they trust, so they need to follow a “chain” from any other certificate to those roots. Hope that made sense.
The -0002 in the filename is a counter, that’s why I said there might be other certificates, because you know, counters don’t generally start from two Can you look in the nginx configuration for mentions of fullchain.pem or privkey.pem to see if they have that -0002 in there or not ?
I think that's a very reasonable choice. Be careful to check those nginx configuration files for any other mentions of /etc/letsencrypt/live/slaney.org in case there are more to change to point to -0002, there should be at least fullchain.pem and privkey.pem to be changed, but there could be other mentions.
However, you mentioned that when you ask to renew again, it does, and that's still a bit concerning, maybe someone more expert in matters of certbot can chime in about that?
Perhaps the script is looking at slaney.org/live/cert.pem, noticing that it's still about to expire, and running the renewal with certonly, which then actually renews slaney.org-0002/live/cert.pem instead. Then re-running the script may repeat this process.
If this is true, then @MalcolmSlaney may hit a rate limit relatively soon because the 0002 cert will get renewed over and over again unnecessarily. A possible way to work around this would be to move /etc/letsencrypt/renewal/slaney.org.conf, /etc/letsencrypt/live/slaney.org, and /etc/letsencrypt/archive/slaney.org out of /etc/letsencrypt. The same would probably have to be done with slaney.org-0001, for the same reason.
Using certbot renew instead would presumably renew all three certificates, which is unnecessary for the first two but has the advantage that it only renews any individual certificate when that particular certificate is about to expire. The le-renew-webroot script is probably trying to achieve this behavior but doesn't work as intended when there are two different certs with exactly the same names.