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

net: DNS requests do not work on Android #10714

Closed
timcooijmans opened this issue May 6, 2015 · 1 comment
Closed

net: DNS requests do not work on Android #10714

timcooijmans opened this issue May 6, 2015 · 1 comment
Milestone

Comments

@timcooijmans
Copy link
Contributor

DNS requests on Android from JNI libraries do not work: Go tries to do the DNS lookup itself by connecting to the local DNS server over UDP but nothing seems to be listening.

I/GoLog﹕ lookup google.com on [::1]:53: read udp [::1]:35142->[::1]:53: connection refused

Code used:

func LookupTest() {
    _, err := net.LookupIP("google.com")
    if err != nil {
        log.Fatal(err)
    }
}

This code is called from an Android class by the JNI wrappers provided by gomobile bind.

This issue may be related to or the same as #8877 but I'm not sure.

Android version: 5.1
Go version: devel +4ddd751
x/mobile version: master branch tip: #601608a0e07a5bd0cf7fddbfc9b7d5f6b23e9476

@timcooijmans timcooijmans changed the title x/mobile: DNS request do not work on Android x/mobile: DNS requests do not work on Android May 6, 2015
@bradfitz bradfitz self-assigned this May 6, 2015
@bradfitz bradfitz added this to the Go1.5 milestone May 6, 2015
@bradfitz bradfitz changed the title x/mobile: DNS requests do not work on Android net: DNS requests do not work on Android May 6, 2015
@gopherbot
Copy link
Contributor

CL https://golang.org/cl/9793 mentions this issue.

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

3 participants