# CA Root do Lets Encrypt expirou, certificado não renovou, CentOS 7

**URL:** https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470
**Category:** Ajuda (em português)
**Created:** [October 18, 2021, 8:37pm UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470 "2021-10-18T20:37:11Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![SergioFisco](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@SergioFisco](https://community.letsencrypt.org/u/SergioFisco)
#### Post date: [October 18, 2021, 8:37pm UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/1 "2021-10-18T20:37:11Z")

</div>

Por favor, preencha todos os campos abaixo para que nós possamos ajudar você. Obs.: você deve indicar seu nome de domínio para receber ajuda. Os nomes de domínio dos certificados emitidos são divulgados nos logs da Transparência de Certificados (por exemplo, [https://crt.sh/?q=example.com](https://crt.sh/?q=example.com)). Assim, não indicar seu nome de domínio não o mantém em segredo, mas torna a nossa ajuda mais difícil.

Posso ler respostas em inglês: sim

Meu nome de domínio é: www.fiscodata.com.br

Executei esse comando: /usr/bin/certbot renew

Produziu essa saída:Saving debug log to /var/log/letsencrypt/letsencrypt.log

* * *

Processing /etc/letsencrypt/renewal/www.fiscodata.com.br.conf

* * *

Cert is due for renewal, auto-renewing...  
Plugins selected: Authenticator standalone, Installer None  
Starting new HTTPS connection (1): [acme-v02.api.letsencrypt.org](http://acme-v02.api.letsencrypt.org)  
Failed to renew certificate www.fiscodata.com.br with error: **str** returned non-string (type Error)

* * *

All renewals failed. The following certificates could not be renewed:  
/etc/letsencrypt/live/www.fiscodata.com.br/fullchain.pem (failure)

* * *

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

Meu servidor web é (com versão): Apache/2.4.6 (CentOS)

O sistema operacional no meu servidor web é (com versão): CentOs 7

O serviço de hospedagem do meu site (se aplicável) é: Algar

Posso acessar um shell root na minha máquina (sim ou não, ou não sei): sim

Uso um painel de controle para administrar meu site (não, ou indique o nome e a versão do painel de controle):não

---

<div class="post-metadata">

### Author: ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)
#### Post date: [October 18, 2021, 9:51pm UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/2 "2021-10-18T21:51:05Z")

</div>

Bom dia @SergioFisco,

Qual a versão do Certbot que está usando?

Pode compartilhar o arquivo `/var/log/letsencrypt/letsencrypt.log` ou pelo menos a parte mostrando o contexto dessa tentativa de renovar?

---

<div class="post-metadata">

### Author: ![SergioFisco](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@SergioFisco](https://community.letsencrypt.org/u/SergioFisco)
#### Post date: [October 18, 2021, 11:20pm UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/3 "2021-10-18T23:20:41Z")

</div>

Log de ontem 17/10/2020

```nohighlight
2021-10-17 23:50:01,504:DEBUG:certbot._internal.main:certbot version: 1.11.0
2021-10-17 23:50:01,504:DEBUG:certbot._internal.main:Location of certbot entry point: /usr/bin/certbot
2021-10-17 23:50:01,504:DEBUG:certbot._internal.main:Arguments: []
2021-10-17 23:50:01,504:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2021-10-17 23:50:01,521:DEBUG:certbot._internal.log:Root logging level set at 20
2021-10-17 23:50:01,521:INFO:certbot._internal.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2021-10-17 23:50:01,523:DEBUG:certbot.display.util:Notifying user: Processing /etc/letsencrypt/renewal/www.fiscodata.com.br.conf
2021-10-17 23:50:01,533:DEBUG:certbot._internal.plugins.selection:Requested authenticator <certbot._internal.cli.cli_utils._Default object at 0x198ba90> and installer <certbot._internal.cli.cli_utils._Default object at 0x198ba90>
2021-10-17 23:50:01,554:DEBUG:certbot._internal.storage:Should renew, less than 30 days before certificate expiry 2021-09-30 13:45:40 UTC.
2021-10-17 23:50:01,554:INFO:certbot._internal.renewal:Cert is due for renewal, auto-renewing...
2021-10-17 23:50:01,554:INFO:certbot._internal.renewal:Non-interactive renewal: random delay of 211.577772908 seconds
2021-10-17 23:53:33,209:DEBUG:certbot._internal.plugins.selection:Requested authenticator standalone and installer None
2021-10-17 23:53:33,211:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * standalone
Description: Spin up a temporary webserver
Interfaces: IAuthenticator, IPlugin
Entry point: standalone = certbot._internal.plugins.standalone:Authenticator
Initialized: <certbot._internal.plugins.standalone.Authenticator object at 0x198cf90>
Prep: True
2021-10-17 23:53:33,212:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot._internal.plugins.standalone.Authenticator object at 0x198cf90> and installer None
2021-10-17 23:53:33,212:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator standalone, Installer None
2021-10-17 23:53:33,244:DEBUG:certbot._internal.main:Picked account: <Account(RegistrationResource(body=Registration(status=None, terms_of_service_agreed=None, agreement=None, only_return_existing=None, contact=(), key=None, external_account_binding=None), uri=u'', new_authzr_uri=None, terms_of_service=None), 851c2ef9593b01f2269fc8f0cff928d4, Meta(creation_host=u'fiscodatalapp01', register_to_eff=None, creation_dt=datetime.datetime(2021, 7, 2, 14, 42, 58, tzinfo=<UTC>)))> 2021-10-17 23:53:33,250:DEBUG:acme.client:Sending GET request to . 2021-10-17 23:53:33,258:INFO:urllib3.connectionpool:Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org 2021-10-17 23:53:33,644:ERROR:certbot._internal.renewal:Failed to renew certificate with error: __str__ returned non-string (type Error) 2021-10-17 23:53:33,648:DEBUG:certbot._internal.renewal:Traceback was: Traceback (most recent call last): Â File "/usr/lib/python2.7/site-packages/certbot/_internal/renewal.py", line 471, in handle_renewal_request Â Â Â main.renew_cert(lineage_config, plugins, renewal_candidate) Â File "/usr/lib/python2.7/site-packages/certbot/_internal/main.py", line 1233, in renew_cert Â Â Â le_client = _init_le_client(config, auth, installer) Â File "/usr/lib/python2.7/site-packages/certbot/_internal/main.py", line 659, in _init_le_client Â Â Â return client.Client(config, acc, authenticator, installer, acme=acme) Â File "/usr/lib/python2.7/site-packages/certbot/_internal/client.py", line 255, in __init__ Â Â Â acme = acme_from_config_key(config, self.account.key, self.account.regr) Â File "/usr/lib/python2.7/site-packages/certbot/_internal/client.py", line 43, in acme_from_config_key Â Â Â return acme_client.BackwardsCompatibleClientV2(net, key, config.server) Â File "/usr/lib/python2.7/site-packages/acme/client.py", line 831, in __init__ Â Â Â directory = messages.Directory.from_json(net.get(server).json()) Â File "/usr/lib/python2.7/site-packages/acme/client.py", line 1168, in get Â Â Â self._send_request('GET', url, **kwargs), content_type=content_type) Â File "/usr/lib/python2.7/site-packages/acme/client.py", line 1118, in _send_request Â Â Â response = self.session.request(method, url, *args,**kwargs) Â File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 486, in request Â Â Â resp = self.send(prep, **send_kwargs) Â File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 598, in send Â Â Â r = adapter.send(request,**kwargs) Â File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 370, in send Â Â Â timeout=timeout Â File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 544, in urlopen Â Â Â body=body, headers=headers) Â File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 344, in _make_request Â Â Â self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) Â File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 314, in _raise_timeout Â Â Â if 'timed out' in str(err) or 'did not complete (read)' in str(err):Â # Python 2.6 TypeError: __str__ returned non-string (type Error) 2021-10-17 23:53:33,648:DEBUG:certbot.display.util:Notifying user: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2021-10-17 23:53:33,649:ERROR:certbot._internal.renewal:All renewals failed. The following certificates could not be renewed: 2021-10-17 23:53:33,649:ERROR:certbot._internal.renewal:Â /etc/letsencrypt/live/www.fiscodata.com.br/fullchain.pem (failure) 2021-10-17 23:53:33,649:DEBUG:certbot.display.util:Notifying user: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2021-10-17 23:53:33,649:DEBUG:certbot._internal.log:Exiting abnormally: Traceback (most recent call last): Â File "/usr/bin/certbot", line 9, in <module> Â Â Â load_entry_point('certbot==1.11.0', 'console_scripts', 'certbot')() Â File "/usr/lib/python2.7/site-packages/certbot/main.py", line 15, in main Â Â Â return internal_main.main(cli_args) Â File "/usr/lib/python2.7/site-packages/certbot/_internal/main.py", line 1421, in main Â Â Â return config.func(config, plugins) Â File "/usr/lib/python2.7/site-packages/certbot/_internal/main.py", line 1318, in renew Â Â Â renewal.handle_renewal_request(config) Â File "/usr/lib/python2.7/site-packages/certbot/_internal/renewal.py", line 497, in handle_renewal_request Â Â Â len(renew_failures), len(parse_failures))) Error: 1 renew failure(s), 0 parse failure(s) 2021-10-17 23:53:33,650:ERROR:certbot._internal.log:1 renew failure(s), 0 parse failure(s)

```

---

<div class="post-metadata">

### Author: ![schoen](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/schoen/32/79_2.png) [@schoen](https://community.letsencrypt.org/u/schoen)
#### Post date: [October 19, 2021, 1:44am UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/4 "2021-10-19T01:44:01Z")

</div>

@_az what do you think of this type error way down inside the Certbot client implementation? It does seem to have been triggered when first trying to connect to the API, and, being CentOS, may suggest difficulty validating the API's certificate—but it didn't produce a very useful error message.

@SergioFisco obrigado pelas informações. No contexto acho provável que seja um dos problemas descrito no tópico

> [@RHEL/CentOS 7 OpenSSL client compatibility after new chain](https://community.letsencrypt.org/t/rhel-centos-7-openssl-client-compatibility-after-new-chain/151969/1):
>
> A…

e que uma das soluções lá possa resolver. A mais comumente útil solução lá foi atualizar o pacote `ca-certificates` no seu servidor CentOS. Entretanto, a mensagem de erro que você recebeu é distinto da mensagem que os usuários do Certbot costumam receber nesse caso e não sei porque, também não sei se isso indica outro tipo de problema.

Outra coisa que pode tentar, para comparação, é `curl -v https://acme-v02.api.letsencrypt.org/directory` na mesma máquina, só para ver se der um erro de verificação ao se conectar à API.

---

<div class="post-metadata">

### Author: ![\_az](https://avatars.discourse-cdn.com/v4/letter/_/22d042/32.png) [@\_az](https://community.letsencrypt.org/u/_az)
#### Post date: [October 19, 2021, 2:12am UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/5 "2021-10-19T02:12:08Z")

</div>

> [@schoen](#):
>
> but it didn't produce a very useful error message

Yeah it's unfortunate that the underlying error was swallowed in this way.

Edit: oh whoops, of course the error will still be swallowed with the command I suggested. Hmm. ~~I'll try think of something~~. I think the curl command should _probably_ reveal the true error. CentOS 7's curl does use nss instead of libssl, but hopefully it won't be relevant.

---

<div class="post-metadata">

### Author: ![SergioFisco](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@SergioFisco](https://community.letsencrypt.org/u/SergioFisco)
#### Post date: [October 19, 2021, 12:25pm UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/6 "2021-10-19T12:25:13Z")

</div>

[root@fiscodatalapp01 ~]# curl -v [https://acme-v02.api.letsencrypt.org/directory](https://acme-v02.api.letsencrypt.org/directory)

- About to connect() to [acme-v02.api.letsencrypt.org](http://acme-v02.api.letsencrypt.org) port 443 (#0)
- Trying 172.65.32.248...
- Connected to [acme-v02.api.letsencrypt.org](http://acme-v02.api.letsencrypt.org) (172.65.32.248) port 443 (#0)
- Initializing NSS with certpath: sql:/etc/pki/nssdb
- CAfile: /etc/pki/tls/certs/ca-bundle.crt  
CApath: none
- Server certificate:
- 

```
  subject: CN=acme-v01.api.letsencrypt.org

```

- 

```
  start date: Oct 17 20:22:16 2021 GMT

```

- 

```
  expire date: Jan 15 20:22:15 2022 GMT

```

- 

```
  common name: acme-v01.api.letsencrypt.org

```

- 

```
  issuer: CN=R3,O=Let's Encrypt,C=US

```

- NSS error -8179 (SEC\_ERROR\_UNKNOWN\_ISSUER)
- Peer's Certificate issuer is not recognized.
- Closing connection 0  
curl: (60) Peer's Certificate issuer is not recognized.  
More details here: [curl - SSL CA Certificates](http://curl.haxx.se/docs/sslcerts.html)

curl performs SSL certificate verification by default, using a "bundle"  
of Certificate Authority (CA) public keys (CA certs). If the default  
bundle file isn't adequate, you can specify an alternate file  
using the --cacert option.  
If this HTTPS server uses a certificate signed by a CA represented in  
the bundle, the certificate verification probably failed due to a  
problem with the certificate (it might be expired, or the name might  
not match the domain name in the URL).  
If you'd like to turn off curl's verification of the certificate, use  
the -k (or --insecure) option.

---

<div class="post-metadata">

### Author: ![\_az](https://avatars.discourse-cdn.com/v4/letter/_/22d042/32.png) [@\_az](https://community.letsencrypt.org/u/_az)
#### Post date: [October 19, 2021, 10:35pm UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/7 "2021-10-19T22:35:55Z")

</div>

> [@SergioFisco](#):
>
> NSS error -8179 (SEC\_ERROR\_UNKNOWN\_ISSUER)

Thank you!

Could you check these two commands as well:

```
rpm -q ca-certificates

```

and

```
trust list --filter="pkcs11:id=%79%b4%59%e6%7b%b6%e5%e4%01%73%80%08%88%c8%1a%58%f6%e9%9b%6e;type=cert"

```

---

<div class="post-metadata">

### Author: ![SergioFisco](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@SergioFisco](https://community.letsencrypt.org/u/SergioFisco)
#### Post date: [October 20, 2021, 12:52pm UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/8 "2021-10-20T12:52:34Z")

</div>

[root@fiscodatalapp01 ~]# rpm -q ca-certificates  
ca-certificates-2015.2.6-70.1.el7\_2.noarch  
[root@fiscodatalapp01 ~]#  
[root@fiscodatalapp01 ~]# trust list --filter="pkcs11:id=%79%b4%59%e6%7b%b6%e5%e4%01%73%80%08%88%c8%1a%58%f6%e9%9b%6e;type=cert"  
p11-kit: uri contained unrecognized components, nothing will be extracted

---

<div class="post-metadata">

### Author: ![\_az](https://avatars.discourse-cdn.com/v4/letter/_/22d042/32.png) [@\_az](https://community.letsencrypt.org/u/_az)
#### Post date: [October 20, 2021, 8:54pm UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/9 "2021-10-20T20:54:25Z")

</div>

> [@SergioFisco](#):
>
> ca-certificates-2015.2.6-70.1.el7\_2.noarch

This is very out of date and probably explains the issue. Update the package and try again:

```
yum -y install ca-certificates

```

---

<div class="post-metadata">

### Author: ![SergioFisco](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@SergioFisco](https://community.letsencrypt.org/u/SergioFisco)
#### Post date: [October 22, 2021, 2:51pm UTC](https://community.letsencrypt.org/t/ca-root-do-lets-encrypt-expirou-certificado-nao-renovou-centos-7/163470/10 "2021-10-22T14:51:13Z")

</div>

Atualizei o pacote como "\_az" indicou e a renovação se fez OK;

Obrigado pelas dicas importantes.
