Read ECONNRESET - Meteor - node.js

I am suddenly getting this error & there is no way I am able to trace the issue, my server keeps crashing again & again, and I haven't done any changes in months for sure.
events.js:288
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:205:27)
Emitted 'error' event on Socket instance at:
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ECONNRESET',
code: 'ECONNRESET',
syscall: 'read'
}
Anyone facing this issue or have solution to the crash?

Related

Incorrect Header Check at Zlib when install package geolite2-redist

I just got this weird error and did not find a result.
Everything was still fine yesterday. But when I start reinstall my packages ( geolite2-redist) , it gives me this error:
error /home/ubuntu/node_modules/geolite2-redist: Command failed. Exit code: 1 Command: node scripts/postinstall.js Arguments: Directory: /home/ubuntu/node_modules/geolite2-redist Output: Downloading MaxMind databases from mirror... node:events:368 throw er; // Unhandled 'error' event ^ Error: incorrect header check at Zlib.zlibOnError [as onerror] (node:zlib:190:17) Emitted 'error' event on Gunzip instance at: at Gunzip.onerror (node:internal/streams/readable:773:14) at Gunzip.emit (node:events:390:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) {
Have anyone got this error like me before ?

Error: write EPIPE on nextJs (11.1.0) build

I am trying to create my app build on nextJs (v11.1.0), Webpack (5.30.0) with yarn PnP but 99% of the times my build fails with the following error:
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at ChildProcess.target._send (internal/child_process.js:839:20)
at ChildProcess.target.send (internal/child_process.js:710:19)
at ChildProcessWorker.initialize (/tmp/.yarn/__virtual__/jest-worker-virtual-0fce01769d/0/cache/jest-worker-npm-27.0.0-next.5-6f53fab806-d56bfe67cd.zip/node_modules/jest-worker/build/workers/ChildProcessWorker.js:181:11)
at ChildProcessWorker._onExit (/tmp/.yarn/__virtual__/jest-worker-virtual-0fce01769d/0/cache/jest-worker-npm-27.0.0-next.5-6f53fab806-d56bfe67cd.zip/node_modules/jest-worker/build/workers/ChildProcessWorker.js:275:12)
at ChildProcess.emit (events.js:400:28)
at ChildProcess.emit (domain.js:470:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
Emitted 'error' event on ChildProcess instance at:
at internal/child_process.js:843:39
at processTicksAndRejections (internal/process/task_queues.js:77:11) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
I am confused as to why the jest worker is active on build time.

read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:211:20)

I Suddenly got the below issue when I tried to run my next js project. it was run perfectly before and this happen without any changes in the system. Any idea regarding this
yarn run v1.22.17
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc.js" https://nextjs.org/docs/messages/swc-disabled
info - Using external babel configuration from /Users/subodha/Subodha/lab/rpm-web/.babelrc.js
postcss-resolve-url: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
node:events:368
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:211:20)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:390:28)
at TLSSocket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:164:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
Node.js v17.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
subodha#Subodhas-MacBook-Pro rpm-web %```
I gave the same error.
To solve them, I disabled my VPN connection and built it successfully.
so this error should happen for your network connection.
i got the same error when i was using a vpn or without a vpn.
using another vpn solved this issue.

Redis disconnects randomly when running on WSL but works perfectly when run on Linux server

I have node.js app that uses Redis as a cache among other things.
When my app is running on my Linux server it works great without any problems. But when I am running it locally on my windows machine through WSL it disconnects randomly but mostly when it idles.
it disconnects with this error:
Emitted 'error' event on RedisClient instance at:
at RedisClient.on_info_cmd (C:\Users\mynam\OneDrive\Desktop\nodeapp\node_modules\redis\index.js:431:14)
at C:\Users\mynam\OneDrive\Desktop\nodeapp\node_modules\redis\index.js:470:14
at Object.callbackOrEmit [as callback_or_emit] (C:\Users\mynam\OneDrive\Desktop\nodeapp\node_modules\redis\lib\utils.js:89:9)
at Command.callback (C:\Users\mynam\OneDrive\Desktop\nodeapp\node_modules\redis\lib\individualCommands.js:157:15)
at RedisClient.flush_and_error (C:\Users\mynam\OneDrive\Desktop\nodeapp\node_modules\redis\index.js:309:29)
at RedisClient.connection_gone (C:\Users\mynam\OneDrive\Desktop\nodeapp\node_modules\redis\index.js:602:14)
[... lines matching original stack trace ...]
at endReadableNT (node:internal/streams/readable:1307:12) {
code: 'UNCERTAIN_STATE',
command
}
And on rarer times with this error:
Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1139:16)
Emitted 'error' event on RedisClient instance at:
at RedisClient.on_error (C:\Users\mynam\OneDrive\Desktop\nodeapp\node_modules\redis\index.js:341:14)
at Socket.<anonymous> (C:\Users\mynam\OneDrive\Desktop\nodeapp\node_modules\redis\index.js:222:14)
at Socket.emit (node:events:379:20)
at emitErrorNT (node:internal/streams/destroy:188:8)
at emitErrorCloseNT (node:internal/streams/destroy:153:3)
at processTicksAndRejections (node:internal/process/task_queues:81:21) {
errno: -4078,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6379
}

Should ECONNRESET just be handled?

Using the Node net package I'm currently getting a lot of ECONNERESET errors in my application; there is a lot of information online about how to handle them, but are these errors something that should just be handled or fixed? How would you go about finding the issue and fixing it because the stack trace is not that helpful?
Error: read ECONNRESET
at exports._errnoException (util.js:1050:11)
at TCP.onread (net.js:582:26)
[stack]: 'Error: read ECONNRESET\n at exports._errnoException
(util.js:1050:11)\n at TCP.onread (net.js:582:26)',
[message]: 'read ECONNRESET',
code: 'ECONNRESET',
errno: 'ECONNRESET',
syscall: 'read'

Resources