Certbot cannot renew / issue certificates

My domain is: smartesthome.blog / www.smartesthome.blog

ACME test URL: https://smartesthome.blog/.well-known/acme-challenge/test.txt

I ran this command: certbot renew --dry-run

It produced this output:
`-------------------------------------------------------------------------------
** 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:
/usr/local/etc/letsencrypt/live/smartesthome.blog/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)

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: www.smartesthome.blog
    Type: connection
    Detail: Fetching
    https:///.well-known/acme-challenge/3PyC61Z5vtdZxYVCg19exw6IcOFhgYRXxInaLxebvCw:
    Error getting validation data

    Domain: smartesthome.blog
    Type: connection
    Detail: Fetching
    https:///.well-known/acme-challenge/bZazDsVAyoYQZiPwgeA33LcgiwPGadJTkK-R02SBgsY:
    Error getting validation data

    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.
    `

My web server is (include version): Nginx 1.12.2

The operating system my web server runs on is (include version):
FreeBSD 11.1

My hosting provider, if applicable, is: self-hosted

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

My problem is that the hostname is missing from the url under details I suppose. This happens in renewal as well as in creation of new certificates for a different domain.
I just put the debug log here but at least to me it doesn’t give any clear indication what’s going wrong.
Looking forward to your comments!

The site is sending an incorrect redirect from HTTP to HTTPS.

If you access http://smartesthome.blog/ or http://www.smartesthome.blog/, it really does try to redirect to https:///.

What’s the Nginx configuration?

Thanks, that was the right clue. To me everything was working fine until I cleared my browser cache, then the Redirect didn’t work.
I now changed the redirect from https://$server_name$request_uri to https://$host$request_uri . Thanks that put me in the right direction, certificates are renewed now :slight_smile:

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