-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
CLI DNS is resolved using nameservers in resolv.conf only #5138
Comments
Thanks for bringing this to notice @khumps, I see that this is a known issue with cross-compiling binaries with the I'm pinning a bunch of related issues here for future reference, |
I tried compiling with the following command:
Edit: It appears to be working now with CGO_ENABLED=1 |
Any idea how can we solve this? Thank you! |
Was this ever fixed? I'm having a seemingly similar issue where Hasura is routing calls in a way that is different from other os's |
When using the CLI it appears that only the first nameserver in /etc/resolv.conf is used to resolve dns records. resolv.conf is no longer the primary dns on most operating systems and golang no longer uses it as the primary source as of golang 1.13 This results in incorrect dns resolution for anyone who hasn't manually set their DNS in their resolv.conf file to the correct DNS server and completely breaks if one is using split DNS such as is the case for a split-tunnel VPN.
Example
/etc/resolv.conf (doesn't work)
result of
hasura migrate status
FATA[0001] version check: failed to get version from server: failed making version api call: Get https://GRAPH_QL_URL/v1/version: dial tcp: lookup GRAPH_QL_URL on WRONG_DNS_SERVER:53: no such host
/etc/resolv.conf (with secondary DNS server)
result of `hasura migrate status (with secondary correct DNS server)
VERSION NAME SOURCE STATUS DATABASE STATUS
(I don't have anything set up yet so this is expected)I tried to fork the repo and build using golang 1.14 without gox but that did not appear to fix the issue so there is perhaps more of an issue internally
The text was updated successfully, but these errors were encountered: