Node: Unhandled 'error' event : ECONNRESET

Created on 16 Feb 2017  路  3Comments  路  Source: nodejs/node

My http service (using both http and socket.io) had crash after run for long time. I don't know how to make this error again. Please help to know what error and any solution for it. I will deploy to Linux production server any problem with it?

  • Version: v6.9.5
  • Platform: macOS Sierrav10.12.3

events.js:160
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TCP.onread (net.js:569:26)

invalid question

Most helpful comment

this solution solved my problem : https://github.com/ionic-team/ionic-cli/issues/2921#issuecomment-352359738

All 3 comments

This kind of question belongs on the nodejs/help repo issue tracker.

The short answer though is the remote party terminated the connection abruptly while node was reading from the socket. Somewhere in your code or the code of a dependency module, an 'error' event handler is not being added (probably to the socket object), causing the exception to be thrown.

For reference, there's quite a few people coming up against similar uncatchable errors in libraries like request and socket.io - they're not even catchable with process.on('uncaughtException', ...). Some clues here: https://github.com/request/request/issues/2161

this solution solved my problem : https://github.com/ionic-team/ionic-cli/issues/2921#issuecomment-352359738

Was this page helpful?
0 / 5 - 0 ratings