zenhack / simp_le

Simple Let's Encrypt client
GNU General Public License v3.0
224 stars 38 forks source link

Could not remove validation file: No such file or directory - error when forced to renew #148

Open tometzky opened 3 years ago

tometzky commented 3 years ago

When simp_le 0.18.1 is forced to renew a recently created certificate with "--valid_min=7776000" (for testing), it renews the cert successfully, but before finishing, it fails with an error (names changed for privacy):

simp_le \
    --verbose \
    --vhost example.com:/var/www/example.com \
    --email tometzky@example.com \
    --valid_min 7776000 \
    -f account_key.json \
    -f account_reg.json \
    -f key.pem \
    -f full.pem
…
2021-06-27 14:48:34,595:INFO:simp_le:401: Saving key.pem
2021-06-27 14:48:34,595:INFO:simp_le:401: Saving full.pem
2021-06-27 14:48:34,596:DEBUG:simp_le:1134: Removing validation file at /var/www/example.com/.well-known/acme-challenge/UjNWdVYzSj_R3VuV3J6YXV3NXhVcmNiRnhPb1VUZUpX
2021-06-27 14:48:34,596:ERROR:simp_le:1138: Could not remove validation file at /var/www/example.com/.well-known/acme-challenge/UjNWdVYzSj_R3VuV3J6YXV3NXhVcmNiRnhPb1VUZUpX : [Errno 2] No such file or directory: '/var/www/aws.ato.waw.pl/.well-known/acme-challenge/UjNWdVYzSj_R3VuV3J6YXV3NXhVcmNiRnhPb1VUZUpX'

It looks like the program is trying to remove validation file even if it did not need to create one. Based on /var/www/example.com/.well-known/acme-challenge/ timestamp, it was not created while renewing. I suppose validation for the account was still valid from the previous renewal.