send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
7,849
Hi
Had a same fresh error in my nginx error.log
2019/04/16 14:18:49 [error] 16988#0: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
For me helped below Check first your DNS Nameservers.
My example is for dns resolver godaddy. with:
ns47.domaincontrol.com
ns48.domaincontrol.com
Make an nslookup for these domains and you will get two IP-s. Update your /etc/resolv.conf with given nslookup in domain:
- search domaincontrol.com
- nameserver 97.74.103.24
- nameserver 173.201.71.24
Save file, restart nginx and wait few sec. My error message dissapeared from logs. Hope it helps.
Related videos on Youtube
Comments
-
Quintin Par over 1 year
Because of SSL stalping errors I had to set
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; ssl_prefer_server_ciphers on; ssl_stapling on; resolver 127.0.0.1; ssl_stapling_verify on;
But since then I’ve been hit with this error
send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
How do I resolve this?
-
Michael Hampton over 5 yearsUse the correct IP address of your nameserver.
-
-
Janaka Bandara about 3 yearsOn AWS, the problem was resolved when I added the nameserver available in
/etc/resolv.conf
as the first priority (leaving the previously added8.8.x.x
Google nameservers as secondary/tertiary fallbacks)