Getting `Query timed out` on AWS EC2 instance
Closed this issue · 6 comments
We are using AWS EC2 instance and have implemented node.js server written in hapi js which is deployed using docker.
On our development server public-ip library is giving proper result.
Now we have setup staging server with similar configuration. Here we are getting below error.
error: Error: Query timed out
at DNS._ontimeout (/usr/src/app/node_modules/public-ip/node_modules/dns-socket/index.js:98:18)
at ontimeout (/usr/src/app/node_modules/public-ip/node_modules/dns-socket/index.js:52:10)
at wrapper (timers.js:275:11)
at Timer.listOnTimeout (timers.js:92:15)
Can you please suggest some way out of this issue? Let me know if any further information required.
It looks like it's an issue in dns-socket
.
// @silverwind
DNS timeouts are more likely to be a network/firewall issue. Try if
$ dig @208.67.222.222 myip.opendns.com
works on the command line.
@208.67.222.222 myip.opendns.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
this is the output I got when I executed the above mentioned dig command
Yeah, something is blocking outbound DNS queries towards the OpenDNS servers. Either fix that or use the https
check.
Closing as this is not an issue with this module.
On my instance, I added https: true and got this error:
RequestError: connect ENETUNREACH 2604:1380:1:cd00::1:443 - Local (:::0)
Has anyone had any success with this?