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

Golang net resolver error messages are incorrect. #43702

Closed
harshathulasi opened this issue Jan 14, 2021 · 1 comment
Closed

Golang net resolver error messages are incorrect. #43702

harshathulasi opened this issue Jan 14, 2021 · 1 comment

Comments

@harshathulasi
Copy link

What version of Go are you using (go version)?

go1.14.13

Does this issue reproduce with the latest release?

Yes. At least the latest on go playgound

What operating system and processor architecture are you using (go env)?

go env Output
louper$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hthulasi/Library/Caches/go-build"
GOENV="/Users/hthulasi/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY="git.soma.salesforce.com"
GONOSUMDB="git.soma.salesforce.com"
GOOS="darwin"
GOPATH="/Users/hthulasi/go"
GOPRIVATE="git.soma.salesforce.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/hthulasi/go/src/git.soma.salesforce.com/GovCloud-SecDev/louper/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/17/vmjmghsj28d4lzrx7mqshr9r0000gp/T/go-build117441851=/tmp/go-build -gno-record-gcc-switches -fno-common"
louper$ 

What did you do?

If I update/set a the DNS resolver to a custom address the error when host can't connect or couldn't resolve is using the incorrect DNS server address in the response. Example: play.golang.org link: https://play.golang.org/p/LmTM-eOy3q-

What did you expect to see?

I see the error message indicating that it failed with the provisioned DNS server. I am assuming this is just invalid error message but not an issue with golang not using the correct DNS server.

What did you see instead?

It is using the default DNS server (likely configured through DSCP) in the error message instead of 8.8.8.8.

from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
addr: []
err: lookup google.com on 169.254.169.254:53: dial udp 8.8.8.8:53: connect: no route to host
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
addr: []
err: lookup gafwefjawioefjoawjfoaewif.com on 169.254.169.254:53: dial udp 8.8.8.8:53: connect: no route to host

from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
addr: []
err: lookup google.com on 169.254.169.254:53: dial udp 8.8.8.8:53: connect: no route to host
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
addr: []
err: lookup gafwefjawioefjoawjfoaewif.com on 169.254.169.254:53: dial udp 8.8.8.8:53: connect: no route to host
@harshathulasi
Copy link
Author

Duplicate of 43703. Closing this.

@golang golang locked and limited conversation to collaborators Jan 14, 2022
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

2 participants