Read ECONNRESET at TCP.onStreamRead

Hello to all,
I have a problem with Node-RED:
continuously communicates with PLCs using node-red-contrib-s7, it worked well for a long time, once migrated Node.JS and Node-RED (without changes to the flows) from a machine with Windows 7 to a machine with Windows Server 2012 r2, I started getting the following error after a day or two:

16 Mar 10:33:01 - Error: read ECONNRESET
at TCP.onStreamRead (node: internal / stream_base_commons: 211: 20)

this error stops Node-RED

Node.js version: 15.11.0
npm version: 7.6.1
Node-RED version: 1.2.9

as new user, i can't attach flows.json

This is potentially the problem.

I would recommend returning to node v14.

Thanks for your quick response!
I try now and will update in a few days!

Despite changing the version to 14, the error reoccurred.
I noticed that the problem occurs when the connection with a PLC is missing for more than a few minutes.

Last part of the logs:

Blockquote
7 Apr 11:30:39 - [error] [s7 endpoint:PLC - Pozzi Vasca Vecchia] Error: Timeout connecting to the transport
7 Apr 11:30:40 - [error] [s7 endpoint:PLC - Pozzi Vasca Nuova] Error: Timeout connecting to the transport
7 Apr 11:30:54 - [error] [s7 endpoint:PLC - Pozzi Vasca Vecchia] Error: Timeout connecting to the transport
7 Apr 11:30:55 - [error] [s7 endpoint:PLC - Pozzi Vasca Nuova] Error: Timeout connecting to the transport
7 Apr 11:31:10 - [error] [s7 endpoint:PLC - Pozzi Vasca Nuova] Error: Timeout connecting to the transport
7 Apr 11:31:13 - [red] Uncaught Exception:
7 Apr 11:31:13 - Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:209:20)

As this node is crashing node-red, I would read through existing issues that mention ECONNRESET and if necessary raise a new issue.

Bottom line: To the best of its abilities, a node should not crash node-red, it should handle errors. (there are cases where it cannot be avoided)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.