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

node5: dns.V4MAPPED on Solaris causes tests to fail/unexpected results #3800

Closed
jelmd opened this issue Nov 12, 2015 · 5 comments
Closed

node5: dns.V4MAPPED on Solaris causes tests to fail/unexpected results #3800

jelmd opened this issue Nov 12, 2015 · 5 comments
Labels
net Issues and PRs related to the net subsystem. smartos Issues and PRs related to the SmartOS platform.

Comments

@jelmd
Copy link

jelmd commented Nov 12, 2015

On Solaris (using 11.3) adding dns.V4MAPPED to dnsopts.hints seems to be not a good idea, since it forces to return always IPv6ified addresses, which is unexpected and let the following tests fail:

=== release test-net-better-error-messages-port ===
Path: parallel/test-net-better-error-messages-port
assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: '::ffff:127.0.0.1' == '127.0.0.1'
    at Socket.<anonymous> (/export/scratch/build/node-v5.0.0/test/parallel/test-net-better-error-messages-port.js:13:10)
    at Socket.<anonymous> (/export/scratch/build/node-v5.0.0/test/common.js:371:15)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at emitErrorNT (net.js:1255:8)
    at doNTCallback2 (node.js:450:9)
    at process._tickCallback (node.js:364:17)
Command: out/Release/node /export/scratch/build/node-v5.0.0/test/parallel/test-net-better-error-messages-port.js
=== release test-net-dns-lookup ===                                     
Path: parallel/test-net-dns-lookup
assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: '::ffff:127.0.0.1' == '127.0.0.1'
    at Socket.<anonymous> (/export/scratch/build/node-v5.0.0/test/parallel/test-net-dns-lookup.js:15:12)
    at emitThree (events.js:97:13)
    at Socket.emit (events.js:175:7)
    at net.js:968:10
    at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:63:16)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:82:10)
Command: out/Release/node /export/scratch/build/node-v5.0.0/test/parallel/test-net-dns-lookup.js
=== release test-net-remote-address-port ===                                   
Path: parallel/test-net-remote-address-port
assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: -1 != -1
    at Socket.<anonymous> (/export/scratch/build/node-v5.0.0/test/parallel/test-net-remote-address-port.js:35:12)
    at emitNone (events.js:67:13)
    at Socket.emit (events.js:166:7)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1050:10)
Command: out/Release/node /export/scratch/build/node-v5.0.0/test/parallel/test-net-remote-address-port.js

Suggested fix: http://iws.cs.uni-magdeburg.de/~elkner/tmp/node5/ipv4.patch

@r-52
Copy link
Contributor

r-52 commented Nov 12, 2015

Mind me asking, if you could submit the patch as a GitHub pr?

@r-52 r-52 added net Issues and PRs related to the net subsystem. smartos Issues and PRs related to the SmartOS platform. labels Nov 12, 2015
@cjihrig
Copy link
Contributor

cjihrig commented Nov 12, 2015

I'm also curious what the values of dns.ADDRCONFIG and dns.V4MAPPED are on these platforms that do not support one or both of the flags. For example, if we could check for undefined values instead of an if statement that checks for FreeBSD, Android, etc.

@evanlucas
Copy link
Contributor

@jelmd any update on this?

@jelmd
Copy link
Author

jelmd commented Feb 8, 2016

Not really. Used the same patch for 5.1.1 and it works as expected. Haven't had the time yet, to upgrade to a more recent version. The other IP/DNS problem I had (not test related -> get FQDN of the host) could be solved using nameinfo indirectly (see http://unix.stackexchange.com/questions/259702/node-js-get-fqdn ).

@bnoordhuis
Copy link
Member

We no longer set dns.V4MAPPED in v6 as of commit b85a50b so I think this should be fixed. Reopen if that's not the case.

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

No branches or pull requests

5 participants