Hi. My SSL cert is installed, and seems to be working properly, but I have some errors related to it in my nginx logs, that I haven't been able to figure out on my own. The errors are:
2022/08/07 14:07:33 [error] 1564#1564: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2022/08/07 14:07:33 [error] 1564#1564: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2022/08/07 14:07:38 [error] 1564#1564: r3.o.lencr.org could not be resolved (110: Operation timed out) while requesting certificate status, responder: r3.o.lencr.org, certificate: "/etc/nginx/ssl/my.domain.example/fullchain.pem"
I have been searching for a fix from the perspective of nginx, but I am overwhelmed by the amount of information, and what I have tried, hasn't fixed the problem. I am using Ubuntu 20.04 server on a VPS.
Thanks for your reply. I'm sorry though, but could you be more specific? I seem to have a couple of files that concern DNS configs. The netplan yaml file is user editable, but the resolv.conf is dynamic. Here is output of one command:
resolvectl status
Global
LLMNR setting: no
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
Current DNS Server: 209.222.18.222
DNS Servers: 209.222.18.222
209.222.18.218
8.8.8.8
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
168.192.in-addr.arpa
17.172.in-addr.arpa
18.172.in-addr.arpa
19.172.in-addr.arpa
20.172.in-addr.arpa
21.172.in-addr.arpa
22.172.in-addr.arpa
23.172.in-addr.arpa
24.172.in-addr.arpa
25.172.in-addr.arpa
26.172.in-addr.arpa
27.172.in-addr.arpa
28.172.in-addr.arpa
29.172.in-addr.arpa
30.172.in-addr.arpa
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 3 (tun0)
Current Scopes: none
DefaultRoute setting: no
LLMNR setting: yes
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
Link 2 (eth0)
Current Scopes: DNS
DefaultRoute setting: yes
LLMNR setting: yes
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 185.12.64.1
185.12.64.2
Ok, I was wondering why the discrepancy between what I have, and what I've seen when searching this problem online. Should this address be changed in my nginx configs somewhere?
The logs you posted beg to differ. As in nothing is listening on 127.0.0.1:53. Show us the full output of dig google.com. System resolver adress should be listed in this output.
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION: google.com. 300 IN A 172.253.122.100 google.com. 300 IN A 172.253.122.102 google.com. 300 IN A 172.253.122.101 google.com. 300 IN A 172.253.122.138 google.com. 300 IN A 172.253.122.113 google.com. 300 IN A 172.253.122.139
I have changed this to 8.8.8.8, but I don't think it has solved my issue. Also, looking at /etc/resolv.conf, it still says that 127.0.0.53 is the systemd-resolved stub resolver.
Edit: Maybe it has changed the issue? Since my last boot almost 2 hours ago, I haven't gotten the same error in my nginx log, but I have a different one from the time of boot:
2022/08/08 11:00:38 [warn] 684#684: "ssl_stapling" ignored, host not found in OCSP responder "r3.o.lencr.org" in the certificate "/etc/nginx/ssl/my.example.site/fullchain.pem"
Just came home and here is what the last few lines of my nginx error log look like:
2022/08/08 10:41:30 [error] 1110#1110: r3.o.lencr.org could not be resolved (110: Operation timed out) while requesting certificate status, responder: r3.o.lencr.org, certificate: "/etc/nginx/ssl/darkstar.netlib.re/fullchain.pem"
2022/08/08 11:00:38 [warn] 684#684: "ssl_stapling" ignored, host not found in OCSP responder "r3.o.lencr.org" in the certificate "/etc/nginx/ssl/darkstar.netlib.re/fullchain.pem"
2022/08/08 16:57:20 [warn] 686#686: "ssl_stapling" ignored, host not found in OCSP responder "r3.o.lencr.org" in the certificate "/etc/nginx/ssl/darkstar.netlib.re/fullchain.pem"
2022/08/08 18:50:46 [crit] 1219#1219: *4515 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 58.45.28.50, server: 0.0.0.0:443
2022/08/08 18:58:53 [crit] 1219#1219: *4827 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client: 118.123.105.85, server: 0.0.0.0:443
Here is what my /etc/resolv.conf:
sudo cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 209.222.18.222
nameserver 209.222.18.218
nameserver 8.8.8.8
nameserver 209.222.18.222
nameserver 209.222.18.218
nameserver 8.8.8.8