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: an entry with many aliases in /etc/hosts confuses both cgo and netgo lookup functions #8235
Labels
Milestone
Comments
Thanks for the report. Looks like latest OS X's /etc/hosts contains "fe80::1%somewhere_loopback_interface_name" entry as a localhost. This is an issue on flaky test cases, don't worry about it and sorry for the confusion. I should update my laptop to OS X Mavericks... P.S. Probably adding "::1 localhost" entry just before existing ipv6 localhost entry in /etc/hosts would be a workaround. |
For the record, the default /etc/hosts on OS X Mavericks looks like the following: -- ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost hostname.local ::1 localhost hostname.local fe80::1%lo0 localhost hostname.local 255.255.255.255 broadcasthost -- Can you show us your /etc/hosts? |
This is my /etc/hosts file. -- ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost mac lolcathost EbonHawk 255.255.255.255 broadcasthost ::1 localhost lolcathost EbonHawk fe80::1%lo0 localhost lolcathost -- |
I now see the root cause. Your /etc/hosts makes getaddrinfo confusing with many aliases. You can fix the issue to write: ::1 localhost EbonHawk lolcathost fe80::1%lo0 localhost lolcathost instead of ::1 localhost lolcathost EbonHawk fe80::1%lo0 localhost lolcathost Will keep this issue to make sure the behavior of net package lookup functions. Also filed issue #8243 for handling ipv6 zone identifier. Labels changed: removed os-macosx. |
Closing. There's no easy way to solve this sort of issue except keeping files or databases clean. |
mikioh
changed the title
net: ipv6 entries with many aliases in /etc/hosts confuse both cgo and netgo lookup functions
net: an entry with many aliases in /etc/hosts confuse both cgo and netgo lookup functions
Jun 19, 2015
mikioh
changed the title
net: an entry with many aliases in /etc/hosts confuse both cgo and netgo lookup functions
net: an entry with many aliases in /etc/hosts confuses both cgo and netgo lookup functions
Jun 19, 2015
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: