Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only works when I explicitly set @8.8.8.8? #144

Open
Integralist opened this issue Jul 19, 2024 · 5 comments
Open

Only works when I explicitly set @8.8.8.8? #144

Integralist opened this issue Jul 19, 2024 · 5 comments

Comments

@Integralist
Copy link

👋🏻

I've just brew installed the latest release (1.0.4) and I tried the following query, which times out:

$ doggo example.com

time=2024-07-19T11:10:35.565+01:00 level=ERROR msg="Error looking up DNS records" error="context deadline exceeded"

I tried all sorts of different hostnames and they all timeout.

I then checked the debug flag...

$ doggo bbc.co.uk --debug

time=2024-07-19T11:11:51.761+01:00 level=DEBUG msg="LoadNameservers: Initial nameservers" nameservers=[]
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="No user specified nameservers, falling back to system nameservers"
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="Loaded system nameservers" nameservers="[{Address:8.8.8.8:53 Type:udp} {Address:8.8.4.4:53 Type:udp} {Address:[2001:4860:4860::8888]:53 Type:udp} {Address:[2001:4860:4860::8844]:53 Type:udp}]"
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="initiating UDP resolver"
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="initiating UDP resolver"
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="initiating UDP resolver"
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="initiating UDP resolver"
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="Attempting to resolve" domain=bbc.co.uk. ndots=0 nameserver=[2001:4860:4860::8844]:53
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="Attempting to resolve" domain=bbc.co.uk. ndots=0 nameserver=8.8.8.8:53
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="Attempting to resolve" domain=bbc.co.uk. ndots=0 nameserver=8.8.4.4:53
time=2024-07-19T11:11:51.762+01:00 level=DEBUG msg="Attempting to resolve" domain=bbc.co.uk. ndots=0 nameserver=[2001:4860:4860::8888]:53
time=2024-07-19T11:11:56.763+01:00 level=ERROR msg="Error looking up DNS records" error="context deadline exceeded"

OK, interesting. No initial nameservers, but looks like the system nameservers should suffice, but nope, it still times out.

I then try explicitly setting @8.8.8.8 and it works...

$ doggo bbc.co.uk --debug @8.8.8.8

time=2024-07-19T11:13:11.188+01:00 level=DEBUG msg="LoadNameservers: Initial nameservers" nameservers=[8.8.8.8]
time=2024-07-19T11:13:11.188+01:00 level=DEBUG msg="Added nameserver" nameserver="{Address:8.8.8.8:53 Type:udp}"
time=2024-07-19T11:13:11.188+01:00 level=DEBUG msg="LoadNameservers: Final nameservers" nameservers="[{Address:8.8.8.8:53 Type:udp}]"
time=2024-07-19T11:13:11.188+01:00 level=DEBUG msg="initiating UDP resolver"
time=2024-07-19T11:13:11.188+01:00 level=DEBUG msg="Attempting to resolve" domain=bbc.co.uk. ndots=0 nameserver=8.8.8.8:53
NAME      	TYPE	CLASS	TTL	ADDRESS       	NAMESERVER
bbc.co.uk.	A   	IN   	34s	**************	8.8.8.8:53	
bbc.co.uk.	A   	IN   	34s	************  	8.8.8.8:53	
bbc.co.uk.	A   	IN   	34s	************* 	8.8.8.8:53	
bbc.co.uk.	A   	IN   	34s	**************	8.8.8.8:53	

What's strange is that if I don't specify 8.8.8.8 then it'll switch to system nameservers, and the first one in the list it tries is...

time=2024-07-19T11:13:24.760+01:00 level=DEBUG msg="Attempting to resolve" domain=bbc.co.uk. ndots=0 nameserver=8.8.8.8:53

...which is the same one it uses when I explicitly set 8.8.8.8 (which is when it works 🤦🏻 )

time=2024-07-19T11:13:11.188+01:00 level=DEBUG msg="Attempting to resolve" domain=bbc.co.uk. ndots=0 nameserver=8.8.8.8:53

I'm not sure what I'm doing wrong here as I have a colleague who is using the same Homebrew installed version and it works fine right out of the box 🤔

@mr-karan
Copy link
Owner

Can you paste the exact contents of /etc/resolv.conf please?

@Integralist
Copy link
Author

👋🏻

Sure thing...

#
# macOS Notice
#
# This file is not consulted for DNS hostname resolution, address
# resolution, or the DNS query routing mechanism used by most
# processes on this system.
#
# To view the DNS configuration used by this system, use:
#   scutil --dns
#
# SEE ALSO
#   dns-sd(1), scutil(8)
#
# This file is automatically generated.
#
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844

@marcaurele
Copy link

Same problem on my side, it does not work any more without manually specifying the DNS server with a @ at the end. From the --debug there is not explicit message to understand what's the problem:

$ doggo www.github.com --debug @192.168.78.31
time=2024-08-06T15:49:37.545+02:00 level=DEBUG msg="LoadNameservers: Initial nameservers" nameservers=[192.168.78.31]
time=2024-08-06T15:49:37.545+02:00 level=DEBUG msg="Added nameserver" nameserver="{Address:192.168.78.31:53 Type:udp}"
time=2024-08-06T15:49:37.545+02:00 level=DEBUG msg="LoadNameservers: Final nameservers" nameservers="[{Address:192.168.78.31:53 Type:udp}]"
time=2024-08-06T15:49:37.545+02:00 level=DEBUG msg="initiating UDP resolver"
time=2024-08-06T15:49:37.545+02:00 level=DEBUG msg="Attempting to resolve" domain=www.github.com. ndots=0 nameserver=192.168.78.31:53
NAME           	TYPE 	CLASS	TTL  	ADDRESS     	NAMESERVER       
www.github.com.	CNAME	IN   	3187s	github.com. 	192.168.78.31:53	
github.com.    	A    	IN   	37s  	140.82.121.4	192.168.78.31:53	

$ doggo www.github.com --debug               
time=2024-08-06T15:49:44.339+02:00 level=DEBUG msg="LoadNameservers: Initial nameservers" nameservers=[]
time=2024-08-06T15:49:44.339+02:00 level=DEBUG msg="No user specified nameservers, falling back to system nameservers"
time=2024-08-06T15:49:44.339+02:00 level=DEBUG msg="Loaded system nameservers" nameservers="[{Address:192.168.78.31:53 Type:udp} {Address:192.168.78.1:53 Type:udp} {Address:10.42.0.1:53 Type:udp}]"
time=2024-08-06T15:49:44.339+02:00 level=DEBUG msg="initiating UDP resolver"
time=2024-08-06T15:49:44.339+02:00 level=DEBUG msg="initiating UDP resolver"
time=2024-08-06T15:49:44.339+02:00 level=DEBUG msg="initiating UDP resolver"
time=2024-08-06T15:49:44.339+02:00 level=DEBUG msg="Attempting to resolve" domain=www.github.com. ndots=0 nameserver=192.168.78.31:53
time=2024-08-06T15:49:44.339+02:00 level=DEBUG msg="Attempting to resolve" domain=www.github.com. ndots=0 nameserver=10.42.0.1:53
time=2024-08-06T15:49:44.339+02:00 level=DEBUG msg="Attempting to resolve" domain=www.github.com. ndots=0 nameserver=192.168.78.1:53
time=2024-08-06T15:49:49.341+02:00 level=ERROR msg="Error looking up DNS records" error="context deadline exceeded"

The 3 servers are in my /etc/resolv.conf file.

@Integralist
Copy link
Author

This error reminds me of fastly/cli#289

@Nu1i
Copy link

Nu1i commented Aug 28, 2024

I hava same problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants