# Node-Red keeps stopping

**URL:** https://discourse.nodered.org/t/node-red-keeps-stopping/37537
**Category:** General
**Created:** [15 December 2020 16:34 UTC](https://discourse.nodered.org/t/node-red-keeps-stopping/37537 "2020-12-15T16:34:01Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Control](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@Control](https://discourse.nodered.org/u/Control)
#### Post date: [15 December 2020 16:34 UTC](https://discourse.nodered.org/t/node-red-keeps-stopping/37537/1 "2020-12-15T16:34:01Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [15 December 2020 16:38 UTC](https://discourse.nodered.org/t/node-red-keeps-stopping/37537/2 "2020-12-15T16:38:29Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Control](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@Control](https://discourse.nodered.org/u/Control)
#### Post date: [15 December 2020 16:55 UTC](https://discourse.nodered.org/t/node-red-keeps-stopping/37537/3 "2020-12-15T16:55:07Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [15 December 2020 16:56 UTC](https://discourse.nodered.org/t/node-red-keeps-stopping/37537/4 "2020-12-15T16:56:57Z")

</div>

> [@Control](#):
>
> 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:

```auto
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.

---

<div class="post-metadata">

### Author: ![Control](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@Control](https://discourse.nodered.org/u/Control)
#### Post date: [15 December 2020 16:58 UTC](https://discourse.nodered.org/t/node-red-keeps-stopping/37537/5 "2020-12-15T16:58:36Z")

</div>

Ok. I'll try that. Thanks!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [13 February 2021 16:58 UTC](https://discourse.nodered.org/t/node-red-keeps-stopping/37537/6 "2021-02-13T16:58:38Z")

</div>

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