Let's Encrypt:SSL和 "SERVFAIL查询CAA for domain.com "错误

94 阅读3分钟

我的一个网站因 "连接重置 "错误而停止工作。

NGINX的配置似乎是正确的,同一服务器上的其他网站也在工作。

NGINX也没有出现任何问题,没有错误,PHP-FPM也很好。

让我们用curl 检查一下网站。

curl -Iv example.setevoy.org.ua/

* 尝试139.59.205.180:443...

* 连接到example.setevoy.org.ua (139.59.205.180) 443端口 (#0)

* ALPN,提供h2

* ALPN,提供http/1.1

* 成功设置了证书验证位置。

* CAfile: /etc/ssl/certs/ca-certificates.crt

* CApath: none

* TLSv1.3 (OUT), TLS handshake, Client hello (1):

* OpenSSL SSL_connect: Connection reset by peer in connection to example.setevoy.org.ua:443

* 关闭连接0

curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to example.setevoy.org.ua:443

其原因

因为上面的错误是由SSL_connect 调用报告的,那么首先要检查的是网站的证书,尽管如果它已经过期,那么错误肯定是不同的。

尽管如此,还是去尝试更新证书。

root@rtfm-do-production-d10:/etc/nginx/conf.d# certbot renew

...

试图从/etc/letsencrypt/renewal/example.setevoy.org.ua更新证书(example.setevoy.org.ua)。ua.conf产生了一个意外的错误:授权程序失败。 example.setevoy.org.ua (http-01): urn:ietf:params:acme:error:dns :: DNS问题:SERVFAIL在查找setevoy.org.ua - 该域名的名称服务器可能出现故障。 跳过。

...

"DNS问题:SERVFAIL查找CAA为setevoy.org.ua--该域名的nameservers可能出现故障。" -- 好吧,现在我们有了更多的细节和一个新的错误。

但是,为什么错误出现在顶级域名 -- setevoy.org.ua上?为什么Let's Encrypt要检查CAA记录? 以前,没有CAA记录一切都正常。

无论如何,让我们去检查该域名的DNS -- 找到它们。

root@rtfm-do-production-d10:/etc/nginx/conf.d# whois setevoy.org.ua | grep nserver

nserver: ns-1083.awsdns-07.org

nserver: ns-2030.awsdns-61.co.uk

nserver: ns-271.awsdns-33.com

nserver: ns-721.awsdns-26.net

检查,如果一个服务器返回答案。

root@rtfm-do-production-d10:/etc/nginx/conf.d# dig @ns-1083.awsdns-07.org setevoy.org.ua +short

139.59.205.180

这里一切都很好。

去谷歌,找到一个讨论тут>>,和 Namecheap的这个主题

去检查我的根域名上是否有CAA

嗯......但是谷歌有。

root@rtfm-do-production-d10:/etc/nginx/conf.d# dig google.com CAA +short

0问题 "pki.goog"

顺便说一下,rtfm.co.ua也没有,而且这里一切都在工作(尚未)。也许,它将在下一次更新时打破,将看到。

解决办法

进入Route53,添加一个新的记录。

选择其类型为CAA ,设置其值为0 issue "letsencrypt.org" ,以允许从Let's Encrypt签发SSL证书。

检查,DNS是否被更新。

root@rtfm-do-production-d10:/etc/nginx/conf.d# dig setevoy.org.ua CAA +short

0 问题 "Letencrypt.org"

尝试再次运行certbot renew

root@rtfm-do-production-d10:/etc/nginx/conf.d# certbot renew

...

恭喜你,所有的更新都成功了。 以下的证书已经被更新了。

/etc/letsencrypt/live/example.setevoy.org.ua/fullchain.pem (成功)

完成了。

类似帖子

The postLet's Encrypt:SSL和 "SERVFAIL寻找CAA for domain.com "的错误首次出现在RTFM: Linux, DevOps, and system administration.