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

test-net-dns-custom-lookup failing on many machines #1527

Closed
rvagg opened this issue Apr 26, 2015 · 13 comments
Closed

test-net-dns-custom-lookup failing on many machines #1527

rvagg opened this issue Apr 26, 2015 · 13 comments
Labels
dns Issues and PRs related to the dns subsystem. net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests.
Milestone

Comments

@rvagg
Copy link
Member

rvagg commented Apr 26, 2015

One for @evanlucas I think, see https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/591/ - perhaps make it more flexible than just ::1 as some similar tests are.

@rvagg rvagg changed the title test-net-dns-custom-lookup failing on Ubuntu 15.04 test-net-dns-custom-lookup failing on many machines Apr 26, 2015
@rvagg
Copy link
Member Author

rvagg commented Apr 26, 2015

(edited to say that it's failing on many machines, I just happened to be focusing on Ubuntu 15.04 as a new addition and assumed this was a new failure)

@mscdex mscdex added dns Issues and PRs related to the dns subsystem. net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests. labels Apr 26, 2015
@evanlucas
Copy link
Contributor

On it. Can I get access to be able to kick off a build?

@evanlucas
Copy link
Contributor

hm I must be missing something. It looks like some of those machines are unable to resolve localhost. Getting ENOTFOUND error. It seems like more tests would be failing if that is the case though...

@rvagg
Copy link
Member Author

rvagg commented Apr 27, 2015

I think @jbergstroem was recently tackling this with the FreeBSD machines, related perhaps?

@evanlucas
Copy link
Contributor

Very well could be. The ones in particular I was looking at are the Ubuntu boxes. https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/nodes=ubuntu1204-64/607/tapTestReport/test.tap-460/.

Wonder if it's possible that they do not really support IPv6?

@rvagg
Copy link
Member Author

rvagg commented Apr 27, 2015

eth0      Link encap:Ethernet  HWaddr 04:01:38:31:df:01  
          inet addr:104.131.89.49  Bcast:104.131.127.255  Mask:255.255.192.0
          inet6 addr: fe80::601:38ff:fe31:df01/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11608277 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14097153 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4108361600 (4.1 GB)  TX bytes:3687280248 (3.6 GB)

also in /etc/hosts:

127.0.0.1   localhost
::1     ip6-localhost ip6-loopback

@evanlucas
Copy link
Contributor

ahh that could be it. The test is trying to lookup localhost as an IPv6 address. Should I maybe add a check like in https://github.com/iojs/io.js/blob/master/test/parallel/test-net-connect-options-ipv6.js#L14-L19 before trying the running the test for IPv6?

@rvagg
Copy link
Member Author

rvagg commented Apr 27, 2015

yes, or you could use ip6-localhost as a fallback case, it's fairly common on Linux I think

@wolfeidau
Copy link

@rvagg what is that hosts file from? as it looks incorrect.

This is from a 14.04 host for example, from what i understand ::1 and 127.0.0.1 should point to localhost. see http://tools.ietf.org/html/rfc6761#section-6.3

127.0.0.1   localhost
127.0.1.1   crusty

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

As long as the work around "falls back" that should be ok, but ip6-localhost isn't configured on OSX for example, see the hosts file below.

##
# 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
255.255.255.255 broadcasthost
::1             localhost

@jbergstroem
Copy link
Member

I'm not sure if this is distro default, but yeah - I can confirm that hosts lack a ::1 record for localhost.

@jbergstroem
Copy link
Member

@rvagg said:
I think @jbergstroem was recently tackling this with the FreeBSD machines, related perhaps?

That's slightly different. In FreeBSD jails we couldn't control routing of 127.0.0.1 which means there were no way of handling the situation other than passing an expected result -- in that case through an environment variable. In this case I'd suggest we do as mentioned above, edit hosts to add a ipv6 default for localhost.

@rvagg
Copy link
Member Author

rvagg commented Apr 27, 2015

these build machines are pretty much unmolested with just the basics installed for what we need. See the kinds of defaults we're dealing with, quite mixed:

$ ansible -i ansible-inventory iojs-* -m shell -a 'grep localhost /etc/hosts'
iojs-build-centos7-1 | success | rc=0 >>
127.0.0.1 localhost
::1 ip6-localhost ip6-loopback

iojs-build-centos5-64-1 | success | rc=0 >>
127.0.0.1               localhost.localdomain localhost

iojs-build-centos5-32-1 | success | rc=0 >>
127.0.0.1               localhost.localdomain localhost

iojs-build-centos6-1 | success | rc=0 >>
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

iojs-release-centos5-32-1 | success | rc=0 >>
127.0.0.1               localhost.localdomain localhost

iojs-build-debian8-64-1 | success | rc=0 >>
127.0.0.1   localhost
::1     localhost ip6-localhost ip6-loopback

iojs-release-centos5-64-1 | success | rc=0 >>
127.0.0.1               localhost.localdomain localhost

iojs-build-ubuntu1410-64-1 | success | rc=0 >>
127.0.0.1 localhost
::1 ip6-localhost ip6-loopback

iojs-build-ubuntu1404-64-1 | success | rc=0 >>
127.0.0.1 localhost
::1 ip6-localhost ip6-loopback

iojs-build-ubuntu1204-64-1 | success | rc=0 >>
127.0.0.1   localhost
::1     ip6-localhost ip6-loopback

iojs-build-ubuntu1404-32-1 | success | rc=0 >>
127.0.0.1 localhost
::1 ip6-localhost ip6-loopback

iojs-build-ubuntu1004-64-1 | success | rc=0 >>
127.0.0.1   localhost
::1     ip6-localhost ip6-loopback

iojs-build-ubuntu1004-32-1 | success | rc=0 >>
127.0.0.1   localhost
::1     ip6-localhost ip6-loopback

@Fishrock123 Fishrock123 added this to the 2.0.0 milestone Apr 28, 2015
evanlucas added a commit to evanlucas/node that referenced this issue Apr 28, 2015
The assertion made an assumption that the IPv6 address would always be
`::1`. Since the address can be different on different platforms, it
has been changed to allow multiple addresses.

Fixes: nodejs#1527
PR-URL: nodejs#1531
Reviewed-By: Rod Vagg <[email protected]>
@evanlucas
Copy link
Contributor

Fixed via bfae823. Sorry for breaking the build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dns Issues and PRs related to the dns subsystem. net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

6 participants