Node: win: gc/test-http-client-onerror.js failure in v6.6.0

Created on 20 Sep 2016  路  16Comments  路  Source: nodejs/node

  • Version:v6.6.0
  • Platform:win 2012 (x64)
  • Subsystem:

I have been observing the following error when running this test script on server 2012:

not ok 3 gc/test-http-client-onerror
# D:\build\jenkins-new\v6tstwin\x64node\node\test\gc\test-http-client-onerror.js:37
#       throw er;
#       藛
#
# Error: connect ECONNREFUSED 127.0.0.1:62572
#     at Object.exports._errnoException (util.js:1036:11)
#     at exports._exceptionWithHostPort (util.js:1059:20)
#     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
# We should do 500 requests
# Done: 64/500
# Collected: 64/460
  ---
  duration_ms: 2.266tres
  ...

I believe the problem to be with this section of code in test-http-client-onerror.js

    var req = http.get({
      hostname: 'localhost',
      pathname: '/',
      port: server.address().port

changing hostname to this seeemed to remove the problem for me:

    var req = http.get({
      hostname: '127.0.0.1',
      pathname: '/',
      port: server.address().port

When running the test in a loop, it failed 16/1000 times but with my fix it did not fail once

dns http test windows

All 16 comments

@GeorgeAdams95 do you have any other info about why this would fix the test? Looking at the error, it seems like localhost resolved to 127.0.0.1 correctly, so it seems strange that we're getting ECONNREFUSED with localhost.

Also is this only failing on win2012? Not on win7 etc?

@gibfahn I have only tested on win2012, will run some tests on win7

ping @gdams

this is appearing on windows 7 as well. It seems that on certain machines (mainly post win7) localhost is resolving to IPv6 instead of IPv4 which is why hard coding it back to 127.0.0.1 results in different behavior.

I don't think that would cause this to fail intermittently though.

cc/ @nodejs/platform-windows , any thoughts on what the issue could be here?

~Stress test: https://ci.nodejs.org/job/node-stress-single-test/nodes=win2016/1152/console~

@gibfahn kill the CI it's running on blank (it didn't build the bindings for the client)

1..10000
not ok 1 gc/test-http-client-onerror
  ---
  duration_ms: 0.229
  severity: fail
  stack: |-
    module.js:500
        throw err;
        ^

    Error: Cannot find module './build/Release/binding'
        at Function.Module._resolveFilename (module.js:498:15)
        at Function.Module._load (module.js:437:25)
        at Module.require (module.js:526:17)
        at require (internal/module.js:19:18)
        at Object.<anonymous> (c:\workspace\node-stress-single-test\nodes\win2016\test\gc\test-http-client-onerror.js:14:14)
        at Module._compile (module.js:607:30)
        at Object.Module._extensions..js (module.js:618:10)
        at Module.load (module.js:516:32)
        at tryModuleLoad (module.js:466:12)
        at Function.Module._load (module.js:458:3)
  ...

Since it's ECONNREFUSED, off the top of my head I'd say the internal firewall a.k.a. MpsSvc.

And since it's ECONNREFUSED I think changing the address is placebo.

@gdams Are you by any chance have those failures on a VM?

@gdams Are you by any chance have those failures on a VM?

The failures were on a VMware VM

I could not reproduce those, so I have a wild guess that maybe it is a VM issue. Do you by any chance remember the VMware version?

I'm afraid we don't have access to the vmware server. Interestingly this only occurred on one of many machines in the vmware farm suggesting that the network config for that machine could be different. I will talk to our infra team to see if I can find out

Should this remain open?

Ping @gdams

Given the lack of a follow-up or a clear reproduction I'm going to close this but feel free to reopen if more information is available or anything has changed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cong88 picture cong88  路  3Comments

danielstaleiny picture danielstaleiny  路  3Comments

ksushilmaurya picture ksushilmaurya  路  3Comments

sandeepks1 picture sandeepks1  路  3Comments

filipesilvaa picture filipesilvaa  路  3Comments