# Have to restart node red to deploy a flow

**URL:** <https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120>\
**Category:** General\
**Created:** [19 June 2022 01:14 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120 "2022-06-19T01:14:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![newnodehere](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@newnodehere](https://discourse.nodered.org/u/newnodehere)\
**Post date:** [19 June 2022 01:14 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120/1 "2022-06-19T01:14:26Z")

</div>

Hi,  
having a strange issue with node red. every time i try to deploy the flow my node red get stuck and only way to fix this is restart the node red.  
I got a pc with 64gb ram and AMD Ryzen 4000 processor ( no other apps running).  
any idea what might be going on.

Thanks

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 June 2022 06:23 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120/2 "2022-06-19T06:23:16Z")

</div>

What does the log show?

---

<div class="post-metadata">

**Author:** ![newnodehere](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@newnodehere](https://discourse.nodered.org/u/newnodehere)\
**Post date:** [19 June 2022 13:39 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120/3 "2022-06-19T13:39:45Z")

</div>

there is nothing on the console.

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [19 June 2022 14:13 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120/4 "2022-06-19T14:13:23Z")

</div>

Mmm..

If this isn't getting stuck during start up, there maybe an installed module (node) that is hooking into the `deploy` event. Node RED nodes have the ability to hook in to the `deploy` process.

[https://nodered.org/docs/api/ui/events/](https://nodered.org/docs/api/ui/events/)

it could be that such node is doing so, and is having problems completing its operation.  
I say the above, as its strange why it is not happening at start up.

maybe disable some select nodes, and then try a 2nd deploy after, if after you are able to get a smooth deploy, you have found the culprit.

you could also change the deploy scope - say only modified nodes, so a full deploy isn't executed.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [19 June 2022 14:45 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120/5 "2022-06-19T14:45:18Z")

</div>

Which console?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 June 2022 15:09 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120/6 "2022-06-19T15:09:14Z")

</div>

> [@newnodehere](#):
>
> there is nothing on the console.

In a terminal window, stop NR then start it again. Then open a browser window and make a minor change and do a deploy.  
Go back to the terminal window and copy the log from the start up to it's end and paste it in a reply.

Also, did you add a new node to your flow just before this started to happen?

---

<div class="post-metadata">

**Author:** ![newnodehere](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@newnodehere](https://discourse.nodered.org/u/newnodehere)\
**Post date:** [19 June 2022 16:19 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120/7 "2022-06-19T16:19:39Z")

</div>

C:\Users\b\>node-red  
19 Jun 11:14:23 - [info]

# Welcome to Node-RED

19 Jun 11:14:23 - [info] Node-RED version: v2.2.2  
19 Jun 11:14:23 - [info] Node.js version: v18.4.0  
19 Jun 11:14:23 - [info] Windows\_NT 10.0.22000 x64 LE  
19 Jun 11:14:27 - [info] Loading palette nodes  
19 Jun 11:14:33 - [info] Dashboard version 3.1.7 started at /ui  
19 Jun 11:14:33 - [info] Settings file : C:\Users\b.node-red\settings.js  
19 Jun 11:14:33 - [info] Context store : 'default' [module=memory]  
19 Jun 11:14:33 - [info] User directory : \Users\b.node-red  
19 Jun 11:14:33 - [warn] Projects disabled : editorTheme.projects.enabled=false  
19 Jun 11:14:33 - [info] Flows file : \Users\b.node-red\flows.json  
19 Jun 11:14:33 - [warn]

* * *

Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials  
file will not be recoverable, you will have to delete it and re-enter  
your credentials.

## You should set your own key using the 'credentialSecret' option in your settings file. Node-RED will then re-encrypt your credentials file using your chosen key the next time you deploy a change.

19 Jun 11:14:33 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
19 Jun 11:14:33 - [info] Starting flows  
adding close handler now  
19 Jun 11:14:33 - [info] Started flows  
19 Jun 11:14:39 - [info] Stopping flows  
19 Jun 11:14:39 - [info] Stopped flows  
19 Jun 11:14:39 - [info] Starting flows  
adding close handler now  
19 Jun 11:14:39 - [info] Started flows

nothing on the log.

1. i have been using this node since last 4 years
2. the only recent change is that i upgraded the pc. old PC had 16gb ram and new one has 64gb  
Same flow works find on old pc as well as on RPI. this new pc does have windows 11( i wish i can go back in time and revert back to win 10 ) .  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/f/6f97adc729ccf7dc90fc7dd7a7bc0fdc66e402b7.png)

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [19 June 2022 16:34 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120/8 "2022-06-19T16:34:40Z")

</div>

There is clearly a node, that is doing something when the flow is being restarted.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/d/4d35229b7d22e088900395aaea86c1a0e3ef51c1.png)

Whatever it is doing, it's getting stuck, which is causing the deploy to grind to a halt.  
Disable some of your nodes (maybe some config nodes also), redeploy (twice) and see if it suddenly behaves correctly.

or set the deploy method, to only deploy changed nodes.

you mention its fine on other systems?  
are these system using the same versions of your installed nodes?

if so, something environmental is affecting the close routines of the troublesome node.

You will need to isolate your installed nodes to find out what node is halting the deploy process.

---

<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:** [18 August 2022 16:34 UTC](https://discourse.nodered.org/t/have-to-restart-node-red-to-deploy-a-flow/64120/9 "2022-08-18T16:34:41Z")

</div>

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