Skip to content

net: go 1.5.1 does not use all nameservers for DNS lookups #14025

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

Closed
jiaweizhou opened this issue Jan 20, 2016 · 3 comments
Closed

net: go 1.5.1 does not use all nameservers for DNS lookups #14025

jiaweizhou opened this issue Jan 20, 2016 · 3 comments

Comments

@jiaweizhou
Copy link

On ubuntu , my app can't reslove the domains that can not be find in the first dns but the second.
It just happened when I use golang 1.5.1 . When I use golang 1.4.* , it works well .
For example,I edit /etc/resolve.conf like this:

nameserver 10.27.227.194
nameserver 10.27.227.195

domain a.com is defined in nameserver 10.27.227.194 , and b.com is defined in 10.27.227.195 .
Then my application can not connect to b.com because of the dns , but it can connet to a.com . If I exchange the location of the nameserver , b.com can be connected but a.com can not be.

Thank you.

@ianlancetaylor ianlancetaylor changed the title golang 1.5.1 dns resolve error net: go 1.5.1 does not use all nameservers for DNS lookups Jan 20, 2016
@ianlancetaylor
Copy link
Contributor

Could be a dup of #12778 . Can you try the 1.6 beta?

@mikioh
Copy link
Contributor

mikioh commented Jan 21, 2016

@jiaweizhou,

Also try the following:

drill (or dig or similar) @10.27.227.194 b.com a
drill (or dig or similar) @10.27.227.195 a.com a

If your DNS servers return RCODE=3 (known as NXDOMAIN), the builtin DNS stub resolver in Go 1.5 and above stops querying for avoiding some trap using NXDOMAIN such as NXDOMAIN substitution. The bug exists in Go 1.4 and below.

@bradfitz bradfitz added this to the Unplanned milestone Jan 21, 2016
@mikioh
Copy link
Contributor

mikioh commented Apr 11, 2016

Timeout. Closing.

@mikioh mikioh closed this as completed Apr 11, 2016
@golang golang locked and limited conversation to collaborators Apr 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants