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

no record found for name but curl is perfectly happy #56

Closed
svenstaro opened this issue Apr 27, 2020 · 7 comments · Fixed by #59
Closed

no record found for name but curl is perfectly happy #56

svenstaro opened this issue Apr 27, 2020 · 7 comments · Fixed by #59
Labels
bug Something isn't working

Comments

@svenstaro
Copy link
Contributor

I'm trying to load test an internal host that is only resolvable via a special internal DNS and only IPv4. However, I can resolve that name just fine via nslookup, host, curl, and even hey but oha tells me

[69] no record found for name: internal.host type: A class: IN

I'm calling

oha --ipv4 -q 200 -n 2000 https://internal.host/test

However:

$ nslookup internal.host
Server:		127.0.0.1
Address:	127.0.0.1#53

internal.host	canonical name = redacted.
Name:	redacted
Address: 10.1.241.80
@svenstaro svenstaro changed the title no record found for name but curl if perfectly happy no record found for name but curl is perfectly happy Apr 27, 2020
@hatoo hatoo added the bug Something isn't working label Apr 27, 2020
@hatoo
Copy link
Owner

hatoo commented Apr 27, 2020

[69] no record found for name: internal.host type: A class: IN

oha --ipv4 -q 200 -n 2000 https://internal.host/test

It looks only 69 lookups ware failed while there were 2000 requests.
Is it right? or all requests ware failed? Could you paste oha's all final output here?

@svenstaro
Copy link
Contributor Author

All requests failed, I was just impatient.

Summary:
  Success rate:	0.0000
  Total:	10.0520 secs
  Slowest:	-inf secs
  Fastest:	inf secs
  Average:	0.0000 secs
  Requests/sec:	198.9657

  Total data:	0.00 B
  Size/request:	NaN
  Size/sec:	0.00 B

Response time histogram:

Latency distribution:
  10% in NaN secs
  25% in NaN secs
  50% in NaN secs
  75% in NaN secs
  90% in NaN secs
  95% in NaN secs
  99% in NaN secs

Details (average, fastest, slowest):
  DNS+dialup:	0.0000 secs, inf secs, -inf secs
  DNS-lookup:	0.0000 secs, inf secs, -inf secs

Status code distribution:

Error distribution:
  [2000] no record found for name: internal.host type: A class: IN

@hatoo
Copy link
Owner

hatoo commented Apr 27, 2020

Currently oha resolves a host using trust-dns-resolver.
So I think the issue is likely caused by trust-dns-resolver.

I created a small program that resolves a host via trust-dns-resolver and I believe it's almost the same as oha does.
https://github.com/hatoo/oha-56
Could you run this in your environment?
If this program also fails, we can confirm that this is an issue of trust-dns-resolver.

@svenstaro
Copy link
Contributor Author

Yep, that suspicion is correct!
Output:

Error: no record found for name: internal.host type: A class: IN

@hatoo
Copy link
Owner

hatoo commented Apr 27, 2020

So, Please send this issue to https://github.com/bluejekyll/trust-dns

@svenstaro
Copy link
Contributor Author

Ok done.

@svenstaro
Copy link
Contributor Author

Alright so I've followed up with the author of trust_dns (read here) and as it turns out, I believe you've used it slightly incorrectly. You didn't grab the system config and as such, it defaulted to the Google DNS only while ignoring the resolv.conf.

I made #59 to fix this. It also has a second fix for spurious resolver errors and works around that by limiting the number of concurrent requests to 1. See https://github.com/bluejekyll/trust-dns/issues/933 for that.

@hatoo hatoo closed this as completed in #59 Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants