Node-Red keeps stopping

Hi...

I have a flow in node red that keeps stopping. I always have to open the "node.js command prompt" and run the "node-red" command because it stops at least once every 1 or 2 days. Does anyone know what could possibly be causing that?

Hi @Control, welcome to the forum.

Do you have any log output from Node-RED to indicate why its stopping? Without that it is pretty hard to suggest anything at all.

This is what the command prompt showed me yesterday that I had the problem. I have opc ua nodes working in the flow getting some vaules from an OPC UA Server. The one that is showing is one that lost connection for several minutes and then Node Red stopped. I don't know if that is what is causing the problem because I tried to replicate it (losing connection to the OPC UA Server) to see if that is what stopped it to no results, node red kept on running. This is the log file information that I saved:

14 Dec 11:40:13 - [error] [OpcUa-Client:CT23] Client node error on: CT23
14 Dec 11:40:13 - [error] [OpcUa-Client:CT23] Client node error on: CT23
14 Dec 11:40:13 - [error] [OpcUa-Client:CT23] Client node error on: CT23
14 Dec 11:40:13 - [error] [OpcUa-Client:CT23] Client node error on: CT23
14 Dec 11:40:13 - [error] [OpcUa-Client:CT23] Client node error on: CT23
14 Dec 11:40:13 - [error] [OpcUa-Client:CT23] Client node error on: CT23
17:40:35.943Z :client_base_impl :468 _internal_create_secure_channel err = ClientSecureChannelLayer => Socket is closed !
14 Dec 11:40:36 - [red] Uncaught Exception:
14 Dec 11:40:36 - TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received null
at Hash.update (internal/crypto/hash.js:82:11)
at Object.makeSHA1Thumbprint (C:\Users\trumpf\node_modules\node-opcua-crypto\source\crypto_utils.ts:158:38)
at _verify_serverCertificate (C:\Users\trumpf\node_modules\node-opcua-client\source\private\client_base_impl.ts:212:24)
at C:\Users\trumpf\node_modules\node-opcua-client\source\private\client_base_impl.ts:1027:13
at C:\Users\trumpf\node_modules\node-opcua-client\source\private\client_base_impl.ts:188:9
at C:\Users\trumpf\node_modules\async\dist\async.js:2955:19
at wrapper (C:\Users\trumpf\node_modules\async\dist\async.js:268:20)
at replenish (C:\Users\trumpf\node_modules\async\dist\async.js:435:29)
at iterateeCallback (C:\Users\trumpf\node_modules\async\dist\async.js:424:21)
at C:\Users\trumpf\node_modules\async\dist\async.js:321:20

C:\Users\trumpf>node-red
14 Dec 13:09:34 - [info]

Welcome to Node-RED

14 Dec 13:09:34 - [info] Node-RED version: v1.2.2
14 Dec 13:09:34 - [info] Node.js version: v12.19.0
14 Dec 13:09:34 - [info] Windows_NT 10.0.17134 x64 LE
14 Dec 13:09:38 - [info] Loading palette nodes

Is this helpful?

Yes. It points at a bug in whatever opcua node you have installed. It is missing some error handling so is failing to catch this error:

4 Dec 11:40:36 - TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received null
at Hash.update (internal/crypto/hash.js:82:11)
at Object.makeSHA1Thumbprint (C:\Users\trumpf\node_modules\node-opcua-crypto\source\crypto_utils.ts:158:38)
at _verify_serverCertificate (C:\Users\trumpf\node_modules\node-opcua-client\source\private\client_base_impl.ts:212:24)
at C:\Users\trumpf\node_modules\node-opcua-client\source\private\client_base_impl.ts:1027:13
at C:\Users\trumpf\node_modules\node-opcua-client\source\private\client_base_impl.ts:188:9
at C:\Users\trumpf\node_modules\async\dist\async.js:2955:19
at wrapper (C:\Users\trumpf\node_modules\async\dist\async.js:268:20)
at replenish (C:\Users\trumpf\node_modules\async\dist\async.js:435:29)
at iterateeCallback (C:\Users\trumpf\node_modules\async\dist\async.js:424:21)
at C:\Users\trumpf\node_modules\async\dist\async.js:321:20

You should report this issue against the Node-RED node module you are using for opcua.

Ok. I'll try that. Thanks!