Let's encrypt nao consegue achar dns do dominios

Posso ler respostas em inglês: YES

Meu nome de domínio é: é um certificado com 4 dominios incluidos 3 estao na lista abaixo

Executei esse comando: SUDO CERTBOT escolhi os dominios pela lista de codigos

Produziu essa saída:


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 69 70 71 72
Requesting a certificate for www.transparencia.itacaja.to.gov.br and 3 more domains

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: transparencia.itacaja.to.gov.br
Type: dns
Detail: DNS problem: query timed out looking up A for transparencia.itacaja.to.gov.br; DNS problem: query timed out looking up AAAA for transparencia.itacaja.to.gov.b
r

Domain: www.nfse.itacaja.to.gov.br
Type: dns
Detail: DNS problem: query timed out looking up A for www.nfse.itacaja.to.gov.br; DNS problem: query timed out looking up AAAA for www.nfse.itacaja.to.gov.br

Domain: www.transparencia.itacaja.to.gov.br
Type: dns
Detail: DNS problem: query timed out looking up A for www.transparencia.itacaja.to.gov.br; DNS problem: query timed out looking up AAAA for www.transparencia.itacaja.
to.gov.br

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server
and that it is accessible from the internet.

Some challenges have failed.

Meu servidor web é (com versão): APACHE 2

O sistema operacional no meu servidor web é (com versão): DEBIAN 10

O serviço de hospedagem do meu site (se aplicável) é: AMAZON COM LOADLANCE COM APENAS UMA INSTANCIA

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

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

  • List item

Existe resposta positiva em todos os servidores do site DNS Checker - DNS Check Propagation Tool

Oi @vagnerfprado,

É esquisito que a AC não conseguiu verificar os registros DNS. Fiz alguns testes daqui e com outros serviços de teste e todos concordaram que os registros DNS estavam corretos e corretamente disponíveis.

Pode tentar outra vez?

É possível que a rede que contém o servidor DNS (existe um único servidor DNS, 191.252.128.162, com dois nomes, ns1.itacaja.to.gov.br e ns2.itacaja.to.gov.br) bloqueie acesso de algumas redes? A AC Let's Encrypt usa servidores em vários centros de dados públicos, em vários países. Se o servidor DNS bloqueia algum deles, esse pedido falharia, mesmo que os serviços de teste (hospedados em outros centros de dados) consigam.

(Não há lista dos endereços IP desde quais os pedidos são feitos... é outra história longa.)

2 Likes

I am not a DNS expert but these sorts of DNSviz warnings about mis-matched names and addresses have caused problems for others. It might be worth looking into.
https://dnsviz.net/d/transparencia.itacaja.to.gov.br/dnssec/
@rg305 I am signing off but your expertise could be helpful here

2 Likes

This is unexpected:

nslookup -q=ns itacaja.to.gov.br 8.8.8.8
Server:  dns.google
Address:  8.8.8.8
itacaja.to.gov.br       nameserver = ns1.itacaja.to.gov.br
itacaja.to.gov.br       nameserver = ns2.itacaja.to.gov.br

nslookup -q=ns itacaja.to.gov.br ns.to.gov.br
Server:  ns2.to.gov.br
Address:  187.29.146.20
itacaja.to.gov.br       nameserver = dns2.dattasystem.com.br
itacaja.to.gov.br       nameserver = dns4.dattasystem.com.br
itacaja.to.gov.br       nameserver = dns3.dattasystem.com.br
itacaja.to.gov.br       nameserver = dns1.dattasystem.com.br
1 Like

Estes dominio conseguir gerar, não sei se se foi por que mudei o apontamento para um servidor especifico ou se foi alguma alteração no Lets.

No entanto estou com problemas similares em diversos outros domínios, olha so este problema..

São quatro domínios de um único cliente, na primeira tentativa recebi esta resposta.


You have an existing certificate that contains a portion of the domains you
requested (ref:
/media/disk1/config/letsencrypt/etc/renewal/transparencia.pontealtadotocantins.to.gov.br-0002.conf)

It contains these names: transparencia.pontealtadotocantins.to.gov.br,
www.transparencia.pontealtadotocantins.to.gov.br

You requested these names for the new certificate:
coronavirus.pontealtadotocantins.to.gov.br,
www.coronavirus.pontealtadotocantins.to.gov.br,
transparencia.pontealtadotocantins.to.gov.br,
www.transparencia.pontealtadotocantins.to.gov.br.

Do you want to expand and replace this existing certificate with the new
certificate?


(E)xpand/(C)ancel: e
Renewing an existing certificate for coronavirus.pontealtadotocantins.to.gov.br and 3 more domains
An unexpected error occurred:
Error finalizing order :: Rechecking CAA for "www.coronavirus.pontealtadotocantins.to.gov.br" and 1 more identifiers failed. Refer to sub-problems for more information Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /media/disk1/config/letsencrypt/var/log/letsencrypt.log or re-run Certbot wit
h -v for more details.

ja na segunda tentativa tive esta outra resposta.


You have an existing certificate that contains a portion of the domains you
requested (ref:
/media/disk1/config/letsencrypt/etc/renewal/transparencia.pontealtadotocantins.to.gov.br-0002.conf)

It contains these names: transparencia.pontealtadotocantins.to.gov.br,
www.transparencia.pontealtadotocantins.to.gov.br

You requested these names for the new certificate:
coronavirus.pontealtadotocantins.to.gov.br,
www.coronavirus.pontealtadotocantins.to.gov.br,
transparencia.pontealtadotocantins.to.gov.br,
www.transparencia.pontealtadotocantins.to.gov.br.

Do you want to expand and replace this existing certificate with the new
certificate?


(E)xpand/(C)ancel: e
Renewing an existing certificate for coronavirus.pontealtadotocantins.to.gov.br and 3 more domains
An unexpected error occurred:
Error finalizing order :: Rechecking CAA for "coronavirus.pontealtadotocantins.to.gov.br" and 1 more identifiers failed. Refer to sub-problems for more information Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /media/disk1/config/letsencrypt/var/log/letsencrypt.log or re-run Certbot wit
h -v for more details.

O site principal itacaja.to.gov.br está sendo hospedado em um servidor e o endereço pretendido para certificado está direcionado para outro servidor...

Existe uma entrada de DNS apontando para outro endereço.

Log da tentativa

2022-05-03 09:29:41,908:DEBUG:acme.client:Received response:
HTTP 403
Server: nginx
Date: Tue, 03 May 2022 12:29:41 GMT
Content-Type: application/problem+json
Content-Length: 1087
Connection: keep-alive
Boulder-Requester: 45225631
Cache-Control: public, max-age=0, no-cache
Link: https://acme-v02.api.letsencrypt.org/directory;rel="index"
Replay-Nonce: 010103EvXsT9Twq4r2MxaAb-TzpsGEYOMeCy36-vOhOFWPU

{
"type": "urn:ietf:params:acme:error:caa",
"detail": "Error finalizing order :: Rechecking CAA for "www.coronavirus.pontealtadotocantins.to.gov.br" and 1 more identifiers failed. Refer to
sub-problems for more information",
"status": 403,
"subproblems": [
{
"type": "urn:ietf:params:acme:error:caa",
"detail": "Error finalizing order :: While processing CAA for www.coronavirus.pontealtadotocantins.to.gov.br: DNS problem:
query timed out looking up CAA for www.coronavirus.pontealtadotocantins.to.gov.br",
"status": 403,
"identifier": {
"type": "dns",
"value": "www.coronavirus.pontealtadotocantins.to.gov.br"
}
},,
{
"type": "urn:ietf:params:acme:error:caa",
"detail": "Error finalizing order :: While processing CAA for coronavirus.pontealtadotocantins.to.gov.br: DNS problem: query timed out looking up CAA for coronav$
"status": 403,
"identifier": {
"type": "dns",
"value": "coronavirus.pontealtadotocantins.to.gov.br"
}
}
]
}
2022-05-03 09:29:41,908:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/snap/certbot/1952/bin/certbot", line 8, in
sys.exit(main())
File "/snap/certbot/1952/lib/python3.8/site-packages/certbot/main.py", line 19, in main
return internal_main.main(cli_args)
File "/snap/certbot/1952/lib/python3.8/site-packages/certbot/_internal/main.py", line 1723, in main
return config.func(config, plugins)
File "/snap/certbot/1952/lib/python3.8/site-packages/certbot/_internal/main.py", line 1432, in run
new_lineage = _get_and_save_cert(le_client, config, domains,
File "/snap/certbot/1952/lib/python3.8/site-packages/certbot/_internal/main.py", line 129, in _get_and_save_cert
renewal.renew_cert(config, domains, le_client, lineage)
File "/snap/certbot/1952/lib/python3.8/site-packages/certbot/_internal/renewal.py", line 344, in renew_cert
new_cert, new_chain, new_key, _ = le_client.obtain_certificate(domains, new_key)
File "/snap/certbot/1952/lib/python3.8/site-packages/certbot/_internal/client.py", line 457, in obtain_certificate
cert, chain = self.obtain_certificate_from_csr(csr, orderr)
File "/snap/certbot/1952/lib/python3.8/site-packages/certbot/_internal/client.py", line 355, in obtain_certificate_from_csr
orderr = self.acme.finalize_order(
File "/snap/certbot/1952/lib/python3.8/site-packages/acme/client.py", line 981, in finalize_order
return cast(ClientV2, self.client).finalize_order(
File "/snap/certbot/1952/lib/python3.8/site-packages/acme/client.py", line 795, in finalize_order
self._post(orderr.body.finalize, wrapped_csr)
File "/snap/certbot/1952/lib/python3.8/site-packages/acme/client.py", line 103, in _post
return self.net.post(*args, **kwargs)
File "/snap/certbot/1952/lib/python3.8/site-packages/acme/client.py", line 1272, in post
return self._post_once(*args, **kwargs)
File "/snap/certbot/1952/lib/python3.8/site-packages/acme/client.py", line 1286, in _post_once
response = self._check_response(response, content_type=content_type)
File "/snap/certbot/1952/lib/python3.8/site-packages/acme/client.py", line 1132, in _check_response
raise messages.Error.from_json(jobj)
acme.messages.Error: urn:ietf:params:acme:error:caa :: Certification Authority Authorization (CAA) records forbid the CA from issuing a certificate :: Error finalizing$2022-05-03 09:29:41,909:ERROR:certbot._internal.log:An unexpected error occurred:
2022-05-03 09:29:41,910:ERROR:certbot._internal.log:Error finalizing order :: Rechecking CAA for "www.coronavirus.pontealtadotocantins.to.gov.br" and 1 more identifier

Apos varias tentativas consecutivas o certificado foi criado tambem.

Outros dominios e com todos os sites em protocolo http funcionando.
este dominio que tambem está na lista do 4 solicitado, transparencia.ipueiras.to.gov.br, ele não reclamou do DNS e a origem e destino é os mesmo.


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 65 66 67 68
Requesting a certificate for nfse.ipueiras.to.gov.br and 3 more domains

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: www.nfse.ipueiras.to.gov.br
Type: dns
Detail: DNS problem: query timed out looking up A for www.nfse.ipueiras.to.gov.br; DNS problem: query timed out looking up AAAA for www.nfse.ipueiras.to.gov.br

Domain: www.transparencia.ipueiras.to.gov.br
Type: dns
Detail: DNS problem: query timed out looking up A for www.transparencia.ipueiras.to.gov.br; DNS problem: query timed out looking up AAAA for www.transparencia.ipueira
s.to.gov.br

Domain: nfse.ipueiras.to.gov.br
Type: unauthorized
Detail: 54.198.153.19: Invalid response from DattaNFSe - Nota Fiscal Eletrônica "<meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport"

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server
and that it is accessible from the internet.

Some challenges have failed.

Cada vez que ele faz a checagem emite um erro diferente

Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 65 66 67 68
Requesting a certificate for nfse.ipueiras.to.gov.br and 3 more domains

Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: nfse.ipueiras.to.gov.br
Type: dns
Detail: DNS problem: query timed out looking up A for nfse.ipueiras.to.gov.br; DNS problem: query timed out looking up AAAA for nfse.ipueiras.to.gov.br

Domain: www.transparencia.ipueiras.to.gov.br
Type: dns
Detail: DNS problem: query timed out looking up A for www.transparencia.ipueiras.to.gov.br; DNS problem: query timed out looking up AAAA for www.transparencia.ipueira
s.to.gov.br

Domain: www.nfse.ipueiras.to.gov.br
Type: unauthorized
Detail: 54.198.153.19: Invalid response from DattaNFSe - Nota Fiscal Eletrônica "<meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport"

Os erros relativos ao DNS me fazem pensar que ainda tem algum problem no DNS, talvez servidores que desacordam entre si (como @MikeMcQ e @rg305 sugeriram), ou talvez servidores DNS muito lentos ou sobrecarregados, ou ainda um bloqueio que afeta apenas um centro de dados.

Quanto ao último erro com o conteúdo HTML do site, isso quer dizer que o Certbot não conseguiu alterar o conteúdo na configuração do servidor web para responder com o arquivo certo, e que o servidor web respondeu com uma página padrão.

É também esquisito que deu certo com os outros domínios mas não com esse. As possibilidades que acho mais prováveis seriam

  • uma diferença significativa na configuração Apache entre esse domínio e os outros (que talvez encontraria nos arquivos de configuração) (um exemplo relativamente comum seria uma configuração duplicada, em que o mesmo site é definido em dois lugares distintos na configuração, como em dois arquivos distintos, que é errado do ponto de visto do Apache mas que não impede o servidor de funcionar)

  • algum problema na configuração do load balancer (porque aparecem 6 endereços IP para cada site hospedado nesse serviço, talvez tenham sempre o mesmo conteúdo—baseado nesse servidor—para a maioria dos domínios, mas não para esse?)

Acho que a primeira é mais provável.

2 Likes

The test site unboundtest.com looks up DNS records similar to Let's Encrypt servers. I get different results for repeated tests. The quickest response is about 5 seconds and I also get timeout failures. Note there is also a series of CNAMEs.

Here is one timeout result. It took 30 seconds to timeout. Maybe these detailed results will help someone like @rg305 or even LE staff (?) help debug. It is too complex for me.
https://unboundtest.com/m/AAAA/nfse.ipueiras.to.gov.br/KSX6LCV7

These and similar errors in the log look unusual:

May 03 18:47:37 unbound[382817:0] info: Capsforid: reply is equal. go to next fallback
May 03 18:47:38 unbound[382817:0] info: response for ns2.to.gov.br. AAAA IN
May 03 18:47:38 unbound[382817:0] info: reply from <to.gov.br.> 128.201.16.20#53
May 03 18:47:38 unbound[382817:0] info: Capsforid: reply is equal. go to next fallback
May 03 18:47:38 unbound[382817:0] info: response for ns2.to.gov.br. AAAA IN
May 03 18:47:38 unbound[382817:0] info: reply from <to.gov.br.> 128.201.16.20#53
May 03 18:47:38 unbound[382817:0] info: Capsforid: reply is equal. go to next fallback
May 03 18:47:39 unbound[382817:0] info: response for to.gov.br. DNSKEY IN
May 03 18:47:39 unbound[382817:0] info: reply from <to.gov.br.> 131.72.217.20#53
May 03 18:47:39 unbound[382817:0] info: Capsforid: reply is equal. go to next fallback
May 03 18:47:42 unbound[382817:0] info: Missing DNSKEY RRset in response to DNSKEY query.
1 Like

@vagnerfprado, isso me faz pensar que realmente haja um problema nos servidores DNS.

Demorar 30 segundos não seria apenas a culpa da conexão internacional; podemos carregar vários sites brasileiros desde nossas redes estrangeiras em (ao máximo) centenas de milissegundos, não dezenas de segundos.

3 Likes