Failed to renew certificate

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: crm.assegai.co.za

I ran this command: sudo certbot certonly --force-renew -d crm.assegai.co.za

It produced this output:`Failed authorization procedure. crm.assegai.co.za (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from https://crm.assegai.co.za/.well-known/acme-challenge/wASO2SCGkAZedclN_GDY3iYPyq0floJYqMV8J2ajW60 [34.67.199.159]: “<!doctype html>\n<html lang=“en” dir=“ltr”>\n\n\n <meta charset=“utf-8”>\n \n <base href=”/">\n\n <meta"

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: crm.assegai.co.za
    Type: unauthorized
    Detail: Invalid response from
    https://crm.assegai.co.za/.well-known/acme-challenge/wASO2SCGkAZedclN_GDY3iYPyq0floJYqMV8J2ajW60
    [34.67.199.159]: "<!doctype html>\n<html lang=“en”
    dir=“ltr”>\n\n\n <meta charset=“utf-8”>\n

    \n \n\n <meta"

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

My web server is (include version): Nginx

The operating system my web server runs on is (include version): Ubuntu 18.04

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):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.31.0

1 Like

Hi @arnab.sharma

there is a hidden check of your domain (via “check your website”), 15 minutes old.

http + /.well-known/acme-challenge/random-filename is redirected to https (that’s ok), but there is a http status 200, not the expected result http status 404 - Not Found.

What says

nginx -T

What’s the authenticator you use? The content of your certbot config file?

Perhaps remove the redirect http -> https, if the path starts with /.well-known/acme-challenge.

1 Like

What was the rest of Certbot’s output?

Edit: By the way, there is usually no reason to use --force-renew. Your certificate was issued in January, so Certbot would want to renew it anyway.

1 Like

Hi Juergen
The content of my nginx -T command was quite big. What part should I paste ?
Also the rest of certbot’s output is:
`Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Cert is due for renewal, auto-renewing…
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for crm.assegai.co.za
nginx: [warn] conflicting server name “crm.assegai.co.za” on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name “" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on [::]:80, ignored
nginx: [warn] conflicting server name "
” on [::]:80, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on [::]:5005, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on [::]:5200, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on [::]:443, ignored
Waiting for verification…
Cleaning up challenges
nginx: [warn] conflicting server name “crm.assegai.co.za” on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name “" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on [::]:80, ignored
nginx: [warn] conflicting server name "
” on [::]:80, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on [::]:5005, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on [::]:5200, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on 0.0.0.0:443, ignored
nginx: [warn] conflicting server name “crm.assegai.co.za” on [::]:443, ignored
Failed authorization procedure. crm.assegai.co.za (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from https://crm.assegai.co.za/.well-known/acme-challenge/pvoCSTskA2clHo220SQTKLd8mOQXuztPykxUQrhyaC0 [34.67.199.159]: “<!doctype html>\n<html lang=“en” dir=“ltr”>\n\n\n <meta charset=“utf-8”>\n \n <base href=”/">\n\n <meta"
IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: crm.assegai.co.za
    Type: unauthorized
    Detail: Invalid response from
    https://crm.assegai.co.za/.well-known/acme-challenge/pvoCSTskA2clHo220SQTKLd8mOQXuztPykxUQrhyaC0
    [34.67.199.159]: "<!doctype html>\n<html lang=“en”
    dir=“ltr”>\n\n\n <meta charset=“utf-8”>\n

    \n \n\n <meta"

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

The Content of My certbot config file is as follows:
# renew_before_expiry = 30 days
version = 0.31.0
archive_dir = /etc/letsencrypt/archive/crm.assegai.co.za
cert = /etc/letsencrypt/live/crm.assegai.co.za/cert.pem
privkey = /etc/letsencrypt/live/crm.assegai.co.za/privkey.pem
chain = /etc/letsencrypt/live/crm.assegai.co.za/chain.pem
fullchain = /etc/letsencrypt/live/crm.assegai.co.za/fullchain.pem

Options used in the renewal process

[renewalparams]
account = 9d1a44065e51330210f9516e8fcce617
authenticator = nginx
installer = nginx
server = https://acme-v02.api.letsencrypt.org/directory

1 Like

There

you see the problem. You have duplicated definitions.

Every combination port + domain name must be unique.

Merge all duplicated definitions in one definition -> none of these warnings should be visible.

1 Like

I do not understand duplicate definitions. I have another fil under /etc/nginx/sites-available which has the nginx configuration for my test server. Both the servers are using different ports, its only port 80 and 443 that are same in both the config files. The certificate for the test system succeeds without any issues.

You have more then one server block with the same port and the same domain name crm.assegai.co.za.

That’s wrong, only one block is allowed.

Read your output of nginx -T.

1 Like

Thanks a lot @JuergenAuer. Fixed the problem. There was a duplicate file with the same co figuration lying in sites-enabled. Removed the file and it worked.

1 Like

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