Renew problem only for one of two domains with identical configuration

Please fill out the fields below so we can help you better.

My domain is:
aliswebtasarim.com

I ran this command:
sudo /usr/bin/letsencrypt certonly --manual -d aliswebtasarim.com -d www.aliswebtasarim.com

It produced this output:
Failed authorization procedure. www.aliswebtasarim.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.aliswebtasarim.com/.well-known/acme-challenge/XRa3zIGOJS8gzhl7CFsekdOGlwk4kUQfeoz9tOCevpU: " <!–[if IE]><meta http-equiv='X-UA", aliswebtasarim.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://aliswebtasarim.com/.well-known/acme-challenge/JkmoBCfHPdNW0LQlbyphIAqBmIydFOUDN6xnuwIxhDA: " <!–[if IE]><meta http-equiv='X-UA"

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: www.aliswebtasarim.com
    Type: unauthorized
    Detail: Invalid response from http://www.aliswebtasarim.com/.well-
    known/acme-challenge/XRa3zIGOJS8gzhl7CFsekdOGlwk4kUQfeoz9tOCevpU:
    " <!–[if IE]><meta
    http-equiv='X-UA"

    Domain: aliswebtasarim.com
    Type: unauthorized
    Detail: Invalid response from http://aliswebtasarim.com/.well-known
    /acme-challenge/JkmoBCfHPdNW0LQlbyphIAqBmIydFOUDN6xnuwIxhDA:
    " <!–[if IE]><meta
    http-equiv='X-UA"

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A record(s) for that domain
    contain(s) the right IP address.

My operating system is (include version):
macOS Sierra 10.12.24
My web server is (include version):
Ubuntu 16.04.2 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

Hi @mustafa07,

A few questions for you about this:

  • Why did you choose to use --manual?

  • Are you trying to renew an existing certificate? If so, why didn’t use you letsencrypt renew? Is it because you used --manual the first time around?

  • Did Certbot tell you to create particular files in /.well-known/acme-challenge on your web site? If so, did you try to create them and did you have reason to believe you had followed what Certbot asked you to do? The error message suggests that you did not succeed in creating the verification files in the appropriate locations where Certbot should have instructed you to place them.

Hi @schoen ,
Thanks for the answer. Regarding to issues:

  • "Why did you choose to use --manual?"
    because I’m trying to renew an existing certificate which I couldn’t be able to renew via;
    sudo /usr/bin/letsencrypt certonly --webroot -w /var/www/html/alisweb -d aliswebtasarim.com -d
    sudo letsencrypt renew --force-renew
    sudo /usr/bin/letsencrypt renew

Also I checked if can be able to reach https://aliswebtasarım.com/.well-known/acme-challenge/asdf
it seems work. But the interesting part is there is two domains with identical configurations, one is renewed and the other not.

Thanks in advance
Mustada

Are you missing something after the second -d?

Why wouldn't you be able to use --webroot to renew the certificate? Do you get a particular error in this case? Was --webroot how you originally obtained the certificate?

Are you missing something after the second -d?

No, while copy pasting two lines mixed. But I found a way to renew certificate manually first stopping server
then renew with this command:
sudo /usr/bin/letsencrypt certonly -d aliswebtasarim.com -d www.aliswebtasarim.com
and restart server after. Now I need to create a cron job for doing this automatically. Do you have any clue about that?

Thanks

You probably got the certificate with --standalone in this case.

You can probably use something like

/usr/bin/letsencrypt renew --pre-hook "service apache2 stop" --post-hook "service apache2 start"

in your crontab file. This says that if a certificate renewal is necessary, the pre-hook command should be run; then the renewal should be performed; finally, the post-hook command should be run.

I don’t know what commands you used to stop and restart your web server, so I used some Apache-oriented commands, but you could substitute the commands that you would normally use.

If you want to confirm that it work, you can add --force-renew to this command line and then let it run once from crontab, and make sure a renewal happened and the server was restarted. However, when running this command regularly, you should leave out --force-renew because otherwise it will renew the certificate much too frequently and run into Let’s Encrypt rate limits.

Also, the crontab in question needs to run as root, not as a regular user.

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