# Renewal problems after upgrading certbot

**URL:** <https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314>\
**Category:** Help\
**Created:** [February 16, 2019, 10:47am UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314 "2019-02-16T10:47:59Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![joewalker](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/joewalker/32/29956_2.png) [@joewalker](https://community.letsencrypt.org/u/joewalker)\
**Post date:** [February 16, 2019, 10:47am UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/1 "2019-02-16T10:47:59Z")

</div>

I started with letsencrypt before there was an ubuntu package of certbot (i.e. previously using letsencrypt\_auto). I've recently upgraded to use certbot (version 0.23.0 on ubuntu 18.04), but now renew is failing. I'm using the Apache plugin.

`$ certbot renew --dry-run`

> Attempting to renew cert ([MYDOMAIN.org](http://MYDOMAIN.org)) from /etc/letsencrypt/renewal/MYDOMAIN.org.conf produced an unexpected error: Failed authorization procedure. [MYDOMAIN.org](http://MYDOMAIN.org) (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from [https://MYDOMAIN.org/.well-known/acme-challenge/j-o\_KAnVLIk5\_WKVksXsFrIJ5tfErPudurIplF2rwvk](https://MYDOMAIN.org/.well-known/acme-challenge/j-o_KAnVLIk5_WKVksXsFrIJ5tfErPudurIplF2rwvk) [206.189.123.47]: "\n\n404 Not Found\n\n
> 
> # Not Found
> \n\<p". Skipping.

From poking around it looks as though the Apache config is being updated to serve .well-known/acme-challenge/... from /var/lib/letsencrypt/http\_challenges, which is fine except it seems my redirect to https is happening first, so the result is a 404.

```
<VirtualHost *:80>
    ServerName www.MYDOMAIN.org
    CustomLog /var/log/apache2/access.MYDOMAIN.log combined
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =www.MYDOMAIN.org
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

```

This worked previously, and the failure seems basic so I'm not sure what's wrong. Anyone help me work out what's up?

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [February 16, 2019, 10:49am UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/2 "2019-02-16T10:49:45Z")

</div>

Hi @joewalker

> [@joewalker](#):
>
> Attempting to renew cert ([MYDOMAIN.org](http://MYDOMAIN.org))

please answer the following questions (template in #Help ):

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. [crt.sh | example.com](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:

I ran this command:

It produced this output:

My web server is (include version):

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

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

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

---

<div class="post-metadata">

**Author:** ![joewalker](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/joewalker/32/29956_2.png) [@joewalker](https://community.letsencrypt.org/u/joewalker)\
**Post date:** [February 16, 2019, 10:53am UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/3 "2019-02-16T10:53:58Z")

</div>

My domain is: [alsdiary.org](http://alsdiary.org)

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

It produced this output: `Attempting to renew cert (alsdiary.org) from /etc/letsencrypt/renewal/alsdiary.org.conf produced an unexpected error: Failed authorization procedure. alsdiary.org (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from https://alsdiary.org/.well-known/acme-challenge/j-o_KAnVLIk5_WKVksXsFrIJ5tfErPudurIplF2rwvk [206.189.123.47]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p". Skipping.`

My web server is (include version): Apache 2.4.29

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

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

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [February 16, 2019, 10:59am UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/4 "2019-02-16T10:59:52Z")

</div>

> [@joewalker](#):
>
> 0.23.0

Should be updated to 0.28.0 (if possible).

> [@joewalker](#):
>
> Invalid response from [https://alsdiary.org/.well-known/acme-challenge/](https://alsdiary.org/.well-known/acme-challenge/)...

TLS-SNI-01 (HTTPS) authentication will soon be completely shutoff.

That said, it should have renewed today...

Please show file:  
`/etc/letsencrypt/renewal/alsdiary.org.conf`

And the vhost config for port 443 covering site `alsdiary.org`

Actually this is a bit confusing:

> [@joewalker](#):
>
> Failed authorization procedure. [alsdiary.org](http://alsdiary.org) ( **http-01** ):

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [February 16, 2019, 11:00am UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/5 "2019-02-16T11:00:43Z")

</div>

> [@rg305](#):
>
> TLS-SNI-01 (HTTPS) authentication will soon be completely shutoff.
> 
> That said, it should have renewed today…

The "brown out" period of (I think) 1 week has started recently. See [March 13, 2019: End-of-Life for All TLS-SNI-01 Validation Support - #4 by jsha](https://community.letsencrypt.org/t/march-13-2019-end-of-life-for-all-tls-sni-01-validation-support/74209/4)

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [February 16, 2019, 11:03am UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/6 "2019-02-16T11:03:17Z")

</div>

> [@joewalker](#):
>
> My domain is: [alsdiary.org](http://alsdiary.org)

Checking your domain there is one curious thing ( [https://check-your-website.server-daten.de/?q=alsdiary.org](https://check-your-website.server-daten.de/?q=alsdiary.org) ):

| Domainname | Http-Status | redirect | Sec. | G |
| --- | --- | --- | --- | --- |
| • [http://alsdiary.org/](http://alsdiary.org/) | | | | |
| 206.189.123.47 | 302 | [https://alsdiary.org/](https://alsdiary.org/) | 0.390 | A |
| | | | | |
| • [http://www.alsdiary.org/](http://www.alsdiary.org/) | | | | |
| 206.189.123.47 | 301 | [https://www.alsdiary.org/](https://www.alsdiary.org/) | 0.046 | A |
| | | | | |
| • [https://alsdiary.org/](https://alsdiary.org/) | | | | |
| 206.189.123.47 | 302 | [https://alsdiary.org/auth/login](https://alsdiary.org/auth/login) | 1.750 | A |
| | | | | |
| • [https://www.alsdiary.org/](https://www.alsdiary.org/) | | | | |
| 206.189.123.47 | 200 | | 5.530 | A |
| | | | | |
| • [https://alsdiary.org/auth/login](https://alsdiary.org/auth/login) | 200 | | 1.237 | A |
| | | | | |
| • [http://alsdiary.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de](http://alsdiary.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de) | | | | |
| 206.189.123.47 | 302 | [https://alsdiary.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de](https://alsdiary.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de) | 0.046 | A |
| | | | | |
| • [http://www.alsdiary.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de](http://www.alsdiary.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de) | | | | |
| 206.189.123.47 | 404 | | 0.064 | A |
| Not Found | | | | |
| | | | | |
| • [https://alsdiary.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de](https://alsdiary.org/.well-known/acme-challenge/check-your-website-dot-server-daten-dot-de) | 404 | | 1.220 | A |
| Not Found | | | | |

Your http + non-www redirects to https, that's ok. But your www-version doesn't redirect.

Your certbot is old, perhaps certbot doesn't understand your configuration -\> update or use certbot-auto.

The vHosts of http + www and https + non-www: Do they have the same DocumentRoot?

If yes, use something like

```nohighlight
certbot certonly -a webroot -w yourDocumentRoot -d alsdiary.org -d www.alsdiary.org --dry-run

```

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [February 16, 2019, 11:05am UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/7 "2019-02-16T11:05:38Z")

</div>

> [@joewalker](#):
>
> \<VirtualHost \*:80\>  
> ServerName [www.MYDOMAIN.org](http://www.MYDOMAIN.org)

PS: That may be part of the problem.

Add your non-www as Alias:

```nohighlight
ServerName www.alsdiary.org
ServerAlias alsdiary.org

```

Then both have the same vHost - only one vHost port 80.

---

<div class="post-metadata">

**Author:** ![joewalker](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/joewalker/32/29956_2.png) [@joewalker](https://community.letsencrypt.org/u/joewalker)\
**Post date:** [February 16, 2019, 11:06am UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/8 "2019-02-16T11:06:48Z")

</div>

This sounds like it’s the root of the problem. I’ll check this out (and upgrade certbot too).  
Thanks for the help - I’ll report back

---

<div class="post-metadata">

**Author:** ![joewalker](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/joewalker/32/29956_2.png) [@joewalker](https://community.letsencrypt.org/u/joewalker)\
**Post date:** [February 16, 2019, 2:07pm UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/9 "2019-02-16T14:07:36Z")

</div>

So the apache update is still broken, but I think I have a workaround.

`certbot --version` is now 0.28.0. The redirects are fixed (I broken them while trying to diagnose what was up). [https://check-your-website.server-daten.de/?q=alsdiary.org](https://check-your-website.server-daten.de/?q=alsdiary.org) is now green.

However (formatted for clarity):

```auto
$ certbot renew --dry-run

Attempting to renew cert (alsdiary.org) from
    /etc/letsencrypt/renewal/alsdiary.org.conf produced an unexpected error:
    Failed authorization procedure. alsdiary.org (http-01):
        urn:ietf:params:acme:error:unauthorized ::
            The client lacks sufficient authorization ::
                Invalid response from https://alsdiary.org/.well-known/acme-challenge/0rxu5DvuGvYP059tzj2-T9-JYtvM3lvOv9tFvejMv0k [206.189.123.47]:
                "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p".
Skipping.
The following certs could not be renewed:
  /etc/letsencrypt/live/alsdiary.org/fullchain.pem (failure)

```

It still looks as though the Apache config is being updated to serve .well-known/acme-challenge/… from /var/lib/letsencrypt/http\_challenges, which is fine except it seems my redirect to https is happening first, so the result is a 404 (because the https site doesn’t have the same config update)

Now it seems that `certbot certonly -a webroot -w /web/root -d alsdiary.org -d www.alsdiary.org --dry-run` works OK, so perhaps I have a workaround.

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [February 16, 2019, 2:13pm UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/10 "2019-02-16T14:13:48Z")

</div>

> [@joewalker](#):
>
> [https://check-your-website.server-daten.de/?q=alsdiary.org](https://check-your-website.server-daten.de/?q=alsdiary.org) is now green.

Yes, it's green, Grade A is very good. But there you see the problem:

You have two connections - this if normal, one ip address, one non-www, one www.

But two certificates are listed:

```nohighlight
CN=alsdiary.org
	05.01.2019
	05.04.2019
expires in 48 days	alsdiary.org - 1 entry

```

```nohighlight
CN=alsdiary.org
	16.02.2019
	17.05.2019
expires in 90 days	alsdiary.org, www.alsdiary.org - 2 entries

```

So you must have two different VirtualHosts with different certificates.

So add `alsdiary.org` as ServerAlias to your `www.alsdiary.org` - vHost and remove the standalone `alsdiary.org` vHost.

---

<div class="post-metadata">

**Author:** ![joewalker](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/joewalker/32/29956_2.png) [@joewalker](https://community.letsencrypt.org/u/joewalker)\
**Post date:** [February 16, 2019, 4:08pm UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/11 "2019-02-16T16:08:19Z")

</div>

Thanks for your help:

I fixed that problem - There is only one certificate now:

```auto
$ certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: alsdiary.org
    Domains: alsdiary.org www.alsdiary.org
    Expiry Date: 2019-05-17 14:38:09+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/alsdiary.org/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/alsdiary.org/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

```

However this doesn’t fix the problem: The error message from `certbot renew --dry-run` is unchanged.

---

<div class="post-metadata">

**Author:** ![JuergenAuer](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/juergenauer/32/26491_2.png) [@JuergenAuer](https://community.letsencrypt.org/u/JuergenAuer)\
**Post date:** [February 16, 2019, 4:21pm UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/12 "2019-02-16T16:21:40Z")

</div>

> [@joewalker](#):
>
> I fixed that problem - There is only one certificate now:

Yep, now your two connections use the same certificate with two domain names:

```nohighlight
CN=alsdiary.org
	16.02.2019
	17.05.2019
expires in 90 days	alsdiary.org, www.alsdiary.org - 2 entries

```

> [@joewalker](#):
>
> The error message from `certbot renew --dry-run` is unchanged.

You have a brand-new certificate, so you can ignore the error.

And in two months, instead of

> [@joewalker](#):
>
> Now it seems that `certbot certonly -a webroot -w /web/root -d alsdiary.org -d www.alsdiary.org --dry-run` works OK, so perhaps I have a workaround.

use

```nohighlight
certbot run -a webroot -w /web/root -d alsdiary.org -d www.alsdiary.org -i apache

```

one time, then your config file should be new. Perhaps now your config file has the old values. More then one vHost with the same name is sometimes a problem.

---

<div class="post-metadata">

**Author:** ![joewalker](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/joewalker/32/29956_2.png) [@joewalker](https://community.letsencrypt.org/u/joewalker)\
**Post date:** [February 16, 2019, 4:28pm UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/13 "2019-02-16T16:28:58Z")

</div>

OK - I think this will work - Thanks for your help. I’ve been tearing my hair out about this, and you’ve been super helpful.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [March 18, 2019, 4:29pm UTC](https://community.letsencrypt.org/t/renewal-problems-after-upgrading-certbot/86314/14 "2019-03-18T16:29:04Z")

</div>

Closed on March 18, 2019, 4:29pm UTC

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