Node red crash with bad node parameter

#1

I'm new to Node-Red. It's happened to get Node-Red crash by changing one of node parameters (Modbus TCP - ip address); moreover Node-Red failed to re-start due an uncaught exception during loading of flows.
Eventually, i changed manually of json flows file by using back door and all started back.

And here question: Are there should be a better handle in back-end for managing such scenarios?
I'm come from industrial automation and from my point of view one bad flow should not interference with other and whole server.
Or i did some wrong, or here more things to config?
any feedback appreciated, thanks.

0 Likes

#2

That’s a problem with that node and ideally you would open an issue with the author to get it fixed. You should be able to find a link to the nodes github page from the nodes page on flows.nodered.org

0 Likes

#3

I like whole concept, but a lot of questions arises about internal architecture, thanks anyway.

0 Likes

#4

Hi @Yuriy

If an asynchronous error is left uncaught we catch it in a global exception handler. At this point we do not know which node or module was responsible for the error. We don't know what has caused the error and we have no way of isolating or restarting just that part of the flows.

Here's what Node says about uncaught exceptions: https://nodejs.org/api/process.html#process_warning_using_uncaughtexception_correctly

Attempting to resume normally after an uncaught exception can be similar to pulling out of the power cord when upgrading a computer — nine out of ten times nothing happens - but the 10th time, the system becomes corrupted.
The correct use of 'uncaughtException' is to perform synchronous cleanup of allocated resources (e.g. file descriptors, handles, etc) before shutting down the process. It is not safe to resume normal operation after 'uncaughtException' .

Emphasis all theirs.

0 Likes

#5

Their is one improvement which I believe is coming along shortly, which will allow node-RED to be started in Safe mode where it runs the editor but does not start the flows. This will allow more easy recovery from such problems.

0 Likes

#6

Isolation UI & script execution && each flows will be huge step ahead.

0 Likes

#7

you could also run multiple instances on one machine if you like, each with their own "isolated" flow.

0 Likes

#8

:smile: Thanks.

But i' think it is not solution for production in my case.

0 Likes