I originally installed my certificates using the certbot standalone server because I was having issues with the webroot version working. The certificates are in /etc/letsencrypt/live/mydomain.tld and all of this is working well. However, I want to make sure it’ll renew properly when the time comes.
I run “certbot renew --dry-run” and the response is “No renewals attempted” with the log file stating “no renewal failures”. Looking at this and the logs it is unclear if this means it would have been successful had my certs been near expiry? Were no renewals attempted because it didn’t even try or it couldn’t find them? It doesn’t list my certs as part of the output.
My domain is:
[I don’t think I need to list it to resolve this issue]
I ran this command:
certbot renew
OR
certbot renew --dry-run
It produced this output:
“No renewals were attempted”
Log file includes:
“no renewal failures”
My operating system is (include version):
Jessie Lite
My web server is (include version):
nginx 1.10.1
My hosting provider, if applicable, is:
N/A
I can login to a root shell on my machine (yes or no, or I don’t know):
yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
no
Hey @Osiris, thanks for the suggestion. I have tried the force option (and tried it again now). It gives the same response. I feel like it’s not working because an additional description in the output with the dry run says:
** (The test certificates below have not been saved.)
No renewals were attempted.
However, there are no certificates listed in the output…
Could you get a more verbose log and send us the client log from /var/log/letsencrypt? It sounds like somehow the renewer isn’t seeing that any of your certs exist!
Yes, basically the contents of the log file were printed in addition to the standard output. I agree that it seems like certbot doesn’t know about my certificates, but I just don’t know how to fix it. I’m tempted to uninstall certbot and letsencrypt and delete the certificates and try all over, but I feel that that shouldn’t be necessary.
Hmmm, well, that’s definitely why it’s not attempting to renew anything!
I don’t know how you got certificates without associated files there. You said you have data in /etc/letsencrypt/live (and /etc/letsencrypt/archive)? Corresponding files in /etc/letsencrypt/renewal should have been created at the same time.
You don’t have any memory of deleting anything there or using any other tools or scripts that would have deleted or moved files there?
Do you have older log files from /var/log/letsencrypt at the time of the original issuance of the certificates?
I think the first time I was doing this I gave certbot a different location to place files, following some directions on some other website. After using the standalone version I remember manually moving the certificates to the usual (aforementioned) folder, but any other things that were created might not be located in the right place (I didn’t know files other than the certificates were placed anywhere). The location I originally extracted things to might be deleted.
There are several other log files in the log location, but it seems none correspond to the original issuance of the certificates.
If it would be best for me to kind of uninstall/purge and start over, I can do that
@koreywithak, I think that does explain what you’re seeing, unfortunately. The other files apart form the certificates are used to keep track of what certificates need to be renewed and some information about how to renew them.
It’s possible to reconstruct these other files, but it will involve a fair amount of research, so if you think starting over is feasible, that would be the most straightforward path.
Okay I got everything going again, using standalone (I don’t know why I can’t get my server to serve the necessary files). I now do this:
certbot renew --dry-run
and I get this error:
2016-10-21 18:28:49,209:WARNING:certbot.renewal:Attempting to renew cert from /etc/letsencrypt/renewal/mydomain.tld.conf produced an unexpected error: At least one of the (possibly) required ports is already taken… Skipping.
** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates below have not been saved.)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/mydomain.tld/fullchain.pem (failure)
** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates above have not been saved.)
1 renew failure(s), 0 parse failure(s)
I replaced my domain with mydomain.tld in all of this posting. The renewal works if I stop my webserver.
Is it trying to do the renewal using standalone because I got the original certificates using the standalone installer? I’d like to get the webroot version working so I don’t have to start/stop my server with those hooks. Do you see a problem with my nginx config file?
upstream php-handler {
server 127.0.0.1:9000; #server unix:/var/run/php5-fpm.sock;
}
You shouldn’t make the live directory web-accessible. People can potentially download your system private key.
If you’re using the webroot method, just make sure set the alias to an empty directory that can be used for the purpose of serving the auth file and make sure to set the right real directory in your certbot command. Alternately, if you can serve the file from the real web root, you can just use that structure instead.
Whoa. Yeah that was a stupid mistake. Thanks for noticing it, @motoko. I have since updated the location with the following. For some reason the force renewal with a dry run (with webroot option) says it succeeds even when I had stoped the nginx service. I don’t know how that can be possible unless it automatically starts the standalone server on a failure of the webroot or something. Anyways, I renewed the certificate with “certbot certonly” and forced a real renewal using my webroot and it says it succeeded (no standalone this time). The certificates definitely changed. It seems like it is all working and it scores well at https://www.ssllabs.com/ssltest/analyze.html. Thanks to you both for your help.