Can't renew, 404

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:
studioai.freeddns.org
I ran this command:
certbot renew
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/studioai.freeddns.org.conf


Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for studioai.freeddns.org
Waiting for verification…
Cleaning up challenges
Attempting to renew cert (studioai.freeddns.org) from /etc/letsencrypt/renewal/studioai.freeddns.org.conf produced an unexpected error: Failed authorization procedure. studioai.freeddns.org (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://studioai.freeddns.org/.well-known/acme-challenge/eW0a8CPOXeuAbaUhdiecDhJLiQQnEtpv8LhQ3KBw7Cg [114.186.163.108]: 404. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/studioai.freeddns.org/fullchain.pem (failure)


All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/studioai.freeddns.org/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:

My web server is (include version):
nginx1.10.3

server block from .conf

server {

        listen 80 default_server;

        server_name studioai.freeddns.org;
        root /var/www;

        location ^~ /.well-known/acme-challenge {
                root /var/www/;
        }

        location / {
                return 301 https://$host$request_uri;
        }
}

server {
        listen 443 ssl;
        server_name studioai.freeddns.org;
        ssl_certificate /etc/letsencrypt/live/studioai.freeddns.org/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/studioai.freeddns.org/privkey.pem;
}

The operating system my web server runs on is (include version):
Linux DietPi 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64 GNU/Linux
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 0.28.0

Hi @studioai

there is a check of your domain - https://check-your-website.server-daten.de/?q=studioai.freeddns.org

You have some older certificates

Issuer not before not after Domain names LE-Duplicate next LE
Let's Encrypt Authority X3 2019-06-23 2019-09-21 studioai.freeddns.org
1 entries
Let's Encrypt Authority X3 2019-01-28 2019-04-28 studioai.freeddns.org
1 entries
Let's Encrypt Authority X3 2018-11-29 2019-02-27 studioai.freeddns.org
1 entries

but the last certificate is expired.

Checking your headers there is a

Server: Microsoft-NetCore/2.0

That's not a nginx, so --nginx can't work.

@JuergenAuer Thank you for the reply.
Emby server application seems to interrupt HTTP port, so I stopped the app and tried again.
This time I get a different result, but still not satisfying.

root@DietPi:/etc/nginx# systemctl stop emby-server
root@DietPi:/etc/nginx# certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/studioai.freeddns.org.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for studioai.freeddns.org
Waiting for verification...
Cleaning up challenges
Attempting to renew cert (studioai.freeddns.org) from /etc/letsencrypt/renewal/studioai.freeddns.org.conf produced an unexpected error: Failed authorization procedure. studioai.freeddns.org (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://studioai.freeddns.org/.well-known/acme-challenge/r5v3RJCi1EqaJ77vguzGl1lpqpu3JEbsXcRnKxMcV48: Connection refused. Skipping.
All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/studioai.freeddns.org/fullchain.pem (failure)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/studioai.freeddns.org/fullchain.pem (failure)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 renew failure(s), 0 parse failure(s)

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: studioai.freeddns.org
   Type:   connection
   Detail: Fetching
   http://studioai.freeddns.org/.well-known/acme-challenge/r5v3RJCi1EqaJ77vguzGl1lpqpu3JEbsXcRnKxMcV48:
   Connection refused

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also verify
   that you are serving files from the webroot path you provided.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.