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

ECONNRESET on newer node versions #10900

Closed
dege88 opened this issue Jan 19, 2017 · 4 comments
Closed

ECONNRESET on newer node versions #10900

dege88 opened this issue Jan 19, 2017 · 4 comments
Labels
http Issues or PRs related to the http subsystem. invalid Issues and PRs that are invalid.

Comments

@dege88
Copy link

dege88 commented Jan 19, 2017

  • Version: v4.6.2,v6.9.1
  • Platform: linux
  • Subsystem: http

On a particular website newer versions of node give me a ECONNRESET error, while normal browsers and older versions of node give no problems with the same code

Code:

var http = require("https");

var options = {
  "method": "GET",
  "hostname": "www.adams-music.com",
  "port": null,
  "path": "/"
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    console.log('no errors');
  });
});
req.on("error", function (e) {
	console.log(JSON.stringify(e));
});
req.end();

executing this test i get this output from different node versions:

$ nvm run --lts=argon nodeconnectbug.js
Running node LTS "argon" -> v4.6.2 (npm v2.15.11)
{"code":"ECONNRESET"}
$ nvm run --lts=boron nodeconnectbug.js
Running node LTS "boron" -> v6.9.1 (npm v3.10.8)
{"code":"ECONNRESET"}
$ nvm run 'v0.10.48' nodeconnectbug.js
Running node v0.10.48 (npm v2.15.1)
no errors
@cjihrig
Copy link
Contributor

cjihrig commented Jan 19, 2017

It's probably related to this (seen in Chrome):

The connection to this site uses an obsolete protocol (TLS 1.0), an obsolete key exchange (RSA), and an obsolete cipher (3DES_EDE_CBC with HMAC-SHA1).

@bnoordhuis
Copy link
Member

It's not just node, curl https://www.adams-music.com/ prints Curl_http_done: called premature == 0. The server simply seems to be misbehaving.

I'm going to close this as not-a-bug-in-node, just a change in behavior of how node reacts to improper HTTP responses.

@bnoordhuis bnoordhuis added http Issues or PRs related to the http subsystem. invalid Issues and PRs that are invalid. labels Jan 19, 2017
@dege88
Copy link
Author

dege88 commented Jan 23, 2017

Do you have suggestion on how to bypass this error?
@cjihrig unfortunately every https IIS 6 website use obsolete protocols, and even worse that version is still largely used
@bnoordhuis on my pc curl 7.50.3 gave me no errors, you used some debug parameters to get it?

@dege88
Copy link
Author

dege88 commented Jan 24, 2017

Fixed with suggestion from #9845 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Issues or PRs related to the http subsystem. invalid Issues and PRs that are invalid.
Projects
None yet
Development

No branches or pull requests

3 participants