Hello.
I’ve previously set up certbot
to automatically renew the certificate I created.
The “dry run” didn’t show any errors.
Now I got the email that the certificate will expire soon.
I logged in to the AWS Linux instance to check what’s up and it outputs the error:
sudo certbot renew
:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/www.chan-chan.tk.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/certbot/renewal.py", line 67, in _reconstitute
renewal_candidate = storage.RenewableCert(full_path, config)
File "/usr/lib/python2.7/site-packages/certbot/storage.py", line 444, in __init__
"file reference".format(self.configfile))
CertStorageError: renewal config file {} is missing a required file reference
Renewal configuration file /etc/letsencrypt/renewal/www.chan-chan.tk.conf is broken. Skipping.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No renewals were attempted.
No hooks were run.
Additionally, the following renewal configurations were invalid:
/etc/letsencrypt/renewal/www.chan-chan.tk.conf (parsefail)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 renew failure(s), 1 parse failure(s)
The /etc/letsencrypt/renewal/www.chan-chan.tk.conf
file seems to be empty for some reason:
cat /etc/letsencrypt/renewal/www.chan-chan.tk.conf
ls -l /etc/letsencrypt/renewal/www.chan-chan.tk.conf
-rw-r--r-- 1 root root 0 Feb 26 22:36 /etc/letsencrypt/renewal/www.chan-chan.tk.conf
The dry run still succeeds, even with the empty config file:
**$ sudo certbot certonly --dry-run -d www.chan-chan.tk**
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.chan-chan.tk
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Resetting dropped connection: acme-staging-v02.api.letsencrypt.org
Running post-hook command: systemctl reload nginx
IMPORTANT NOTES:
- The dry run was successful.
How should I proceed from there?
Should I erase all configs and re-create the certificate from scratch?
sudo rm -rf /etc/letsencrypt/archive/www.chan-chan.tk
sudo rm -rf /etc/letsencrypt/live/www.chan-chan.tk
sudo rm /etc/letsencrypt/renewal/www.chan-chan.tk.conf
sudo certbot certonly -d www.chan-chan.tk