-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
Too many ECONNRESET errors after upgrading to 8.12.0 from (8.11.4) #23237
Comments
/cc @mafintosh @nodejs/http2 |
Can you verify that the same behavior applies to the latest Node 10? We are in the process of backporting a lot of work on HTTP2 for Node 8, as the one on Node 8 was left behind. A repro script would be extremely useful to track this down. The behavior of that commit is correct: the socket is being abruptly interrupted. My question right now is how a ECONNRESET is being generated in the first place if all requests are arriving correctly. |
Running it with NODE_DEBUG=tls,net mode shows following logs(only pasted relevant logs for brevity) NET 4396: connect: find host xyz.com
NET 4396: connect: dns options { family: undefined, hints: 0 }
NET 4396: _read
NET 4396: _read wait for connection
NET 4396: afterConnect
TLS 4396: start
NET 4396: _read
NET 4396: Socket._read readStart
TLS 4396: secure established
NET 4396: afterWrite 0
NET 4396: afterWrite call cb
TLS 4396: secure established
NET 4396: afterWrite 0
NET 4396: afterWrite call cb
NET 4396: onread 771
NET 4396: got data
NET 4396: _read
NET 4396: _final: not ended, call shutdown()
NET 4396: onread -4077
NET 4396: destroy
NET 4396: close
NET 4396: close handle
NET 4396: afterShutdown destroyed=true ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: false,
endEmitted: false,
reading: true,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: true,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null } Note the folowing log which triggers socket destroy. NET 4396: onread -4077 Let me know if more details are required from my side. |
cc @nodejs Please update or add the concerned person who can help. |
@kunalkukreja would you have a repro script by any chance? |
@AyushG3112 see this comment #23237 (comment) for script |
The issue persists in v8.14.0 too. On debugging further the issue is being caused by gzip option in the request. Passing the header 'Accept-Encoding' = 'deflate' fixes the issue. Both 'gzip' and 'gzip, deflate' values throw the error. The default value set by request library for 'Accept-Encoding' is 'gzip, deflate'. Refer this This happens only on windows. |
It sounds like this is a server issue, if it doesn't like the 'gzip' value in the Accept-Encoding header. Are you sure the Node.js version is the only factor? E.g., perhaps you also wittingly or unwittingly updated request when you upgraded Node.js and it now contains some changes that exacerbate it? Can you reproduce standalone? I.e., no request, no third-party server? |
Facing this issue on Windows. Node - v8.12.0 My workaround: Upgraded Nodejs to v10.15.0 and the issue disappeared. |
I have the same issue on node.js v8.12.0 and v10.15.0 too. I have client node.js application running through nginx trying to access public api wss://mainnet.infura.io/ws/. The initial connection is okay but the error appears on event streams |
Actually, after deleting nginx completely the error disappeared, though I was using the node.js server as a client to receive data from a remote socket. |
So the solution is deleting nginx in my case
|
@mindfulme what did you have in your nginx config? proxy config? |
I'm closing this issue because of its lack of recent activity. Feel free to reopen or ask that we reopen if you think that it should still be addressed. |
After upgrading nodejs version to 8.12.0, we have seen multiple 'ECONNRESET' socket errors. Same calls are successful in 8.11.4.
This happens when there are bulk requests being executed parallelly. The calls at the other peer are successful.
Version: 8.12.4
Platform: 64-bit (Windows)
Subsystem: https/net/tls
These calls originate from nodejs application to rails server (behind nginx with self signed certificate).
Same calls gives success on retry. On debugging further the error is thrown by net module from this line https://github.com/nodejs/node/blob/v8.12.0/lib/net.js#L622
Script to reproduce the issue:
Above script works fine on 8.11.4 but thows error on 8.12.0. See below errors
I will share NODE_DEBUG logs for net, tls modules
The text was updated successfully, but these errors were encountered: