Ok, tearing my hair out after trying to troubleshoot this issue. I rarely ask on forums but this is too hard for me. You might like the challenge if you're into this sort of thing.
Server unchanged for months, certificate renewal spontaneously stops working without any configuration changes. Yes, this worked plenty, yes, I did not touch the server, yes, this fails now (????)
Fails for dry-run and for "real".
Anyway, the details:
My domain is:
netnets.finance
I ran this command:
sudo certbot renew
The command is in a crontab with --quiet flag, inteded to fetch a new certificate once a month and it worked just fine before more than once as you can see here:
The have 6 logs from 3 different dates
Now, without any changes to the server, it's configuration, or the application, renewal no longer works and it produced this output -v for verbose (I assume):
$ sudo certbot renew -v
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Processing /etc/letsencrypt/renewal/netnets.finance.conf
Certificate is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate for netnets.finance
Performing the following challenges:
http-01 challenge for netnets.finance
Waiting for verification...
Challenge failed for domain netnets.finance
http-01 challenge for netnets.financeCertbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: netnets.finance
Type: unauthorized
Detail: 2600:3c00::f03c:92ff:fedf:7aae: Invalid response from http://netnets.finance/.well-known/acme-challenge/bV182Ou0DhvNRvMTbAQcUPkfsRVansiEcuiFxJL4zNQ: 404Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.
Cleaning up challenges
Failed to renew certificate netnets.finance with error: Some challenges have failed.1 renew failure(s), 0 parse failure(s)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
My web server is (include version):
nginx version: nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version):
Ubuntu 20.04.6 LTS
My hosting provider, if applicable, is:
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
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot):
certbot 2.8.0
You might find the nginx config intestesting too:
server {
server_name netnets.finance;location /static { alias /path/redacted; } # the static folder location / { proxy_pass http://localhost:6969; include /etc/nginx/proxy_params; proxy_redirect off; } # the python app listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/netnets.finance/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/netnets.finance/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = netnets.finance) {
return 301 https://$host$request_uri;
} # managed by Certbotlisten 80; server_name netnets.finance; return 404; # managed by Certbot
}
This should just work as it has before:
Finally, the obvious solution is that nginx is down, but that's not the case. Nginx and my site are up, I confiremd that by pasting the url for the challenge ...
http://netnets.finance/.well-known/acme-challenge/bV182Ou0DhvNRvMTbAQcUPkfsRVansiEcuiFxJL4zNQ](http://netnets.finance/.well-known/acme-challenge/bV182Ou0DhvNRvMTbAQcUPkfsRVansiEcuiFxJL4zNQ:)
... into my broswer and I am greeted by the nginx error screen, so no server is off issue.
So... Yeah?!?? Cheers