# Node-red stopped working?

**URL:** <https://discourse.nodered.org/t/node-red-stopped-working/11741>\
**Category:** General\
**Created:** [1 June 2019 08:42 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741 "2019-06-01T08:42:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![myozone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myozone/32/8904_2.png) [@myozone](https://discourse.nodered.org/u/myozone)\
**Post date:** [1 June 2019 08:42 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/1 "2019-06-01T08:42:26Z")

</div>

Hello, I've had Node-red running happily running for a long time but suddenly it's stopped. It appears to be running with over 100% usage report from TOP but no GUI or anything working - any ideas please?

top - 09:41:05 up 3 min, 2 users, load average: 1.06, 0.72, 0.31  
Tasks: 163 total, 2 running, 161 sleeping, 0 stopped, 0 zombie  
%Cpu(s): 0.4 us, 0.2 sy, 25.0 ni, 74.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st  
KiB Mem: 750636 total, 718816 used, 31820 free, 58152 buffers  
KiB Swap: 102396 total, 1052 used, 101344 free. 151652 cached Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND  
455 pi 25 5 302276 181596 18100 R 99.6 24.2 3:11.88 node-red  
1502 pi 20 0 5268 2540 2148 R 0.7 0.3 0:00.16 top  
4 root 20 0 0 0 0 S 0.3 0.0 0:00.22 kworker/0:0  
128 root 20 0 0 0 0 S 0.3 0.0 0:00.02 kworker/u8:2  
518 mosquit+ 20 0 5092 3608 3212 S 0.3 0.5 0:00.35 mosquitto  
605 root 20 0 16052 9068 7648 S 0.3 1.2 0:00.28 vncserver-x11-c  
1485 pi 20 0 9380 3324 2676 S 0.3 0.4 0:00.02 sshd  
1 root 20 0 5688 4088 2804 S 0.0 0.5 0:08.01 systemd  
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd  
3 root 20 0 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd/0  
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H  
6 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u8:0  
7 root 20 0 0 0 0 S 0.0 0.0 0:00.25 rcu\_sched  
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu\_bh  
9 root rt 0 0 0 0 S 0.0 0.0 0:00.02 migration/0  
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 lru-add-drain  
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0  
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1  
13 root rt 0 0 0 0 S 0.0 0.0 0:00.01 migration/1  
14 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/1  
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0  
16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H  
17 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2  
18 root rt 0 0 0 0 S 0.0 0.0 0:00.01 migration/2  
19 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/2  
20 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/2:0  
21 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/2:0H  
22 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/3  
23 root rt 0 0 0 0 S 0.0 0.0 0:00.01 migration/3  
24 root 20 0 0 0 0 S 0.0 0.0 0:00.02 ksoftirqd/3  
25 root 20 0 0 0 0 S 0.0 0.0 0:00.07 kworker/3:0  
26 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/3:0H  
27 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs  
28 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns  
29 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khungtaskd  
30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 oom\_reaper

pi@raspberrypi:~ $ node-red start  
1 Jun 09:41:29 - [info]

# Welcome to Node-RED

1 Jun 09:41:29 - [info] Node-RED version: v0.18.7  
1 Jun 09:41:29 - [info] Node.js version: v6.14.4  
1 Jun 09:41:29 - [info] Linux 4.9.35-v7+ arm LE  
1 Jun 09:41:32 - [info] Loading palette nodes  
1 Jun 09:41:39 - [warn] [chart request] Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument  
1 Jun 09:41:39 - [warn] [chart response] Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument  
1 Jun 09:41:40 - [info] Dashboard up and running  
1 Jun 09:41:52 - [info] Worldmap version 1.5.30  
1 Jun 09:41:52 - [info] Dashboard version 2.14.0 started at /ui  
1 Jun 09:41:55 - [info] Settings file : /home/pi/.node-red/settings.js  
1 Jun 09:41:55 - [info] User directory : /home/pi/.node-red  
1 Jun 09:41:55 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable  
1 Jun 09:41:55 - [info] Flows file : /home/pi/.node-red/start  
1 Jun 09:41:55 - [info] Creating new flow file  
1 Jun 09:41:55 - [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.

1 Jun 09:41:55 - [info] Starting flows  
1 Jun 09:41:55 - [info] Started flows  
1 Jun 09:41:56 - [red] Uncaught Exception:  
1 Jun 09:41:56 - Error: listen EADDRINUSE 0.0.0.0:1880  
at Object.exports.\_errnoException (util.js:1020:11)  
at exports.\_exceptionWithHostPort (util.js:1043:20)  
at Server.\_listen2 (net.js:1271:14)  
at listen (net.js:1307:10)  
at net.js:1417:9  
at \_combinedTickCallback (internal/process/next\_tick.js:83:11)  
at process.\_tickCallback (internal/process/next\_tick.js:104:9)  
pi@raspberrypi:~ $

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [1 June 2019 08:58 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/2 "2019-06-01T08:58:18Z")

</div>

The

> EADDRINUSE 0.0.0.0:1880

suggests something is already using the port that Node-RED uses. Usually this is node-Red 🙂 you need to stop node-RED using

node-red-stop before using the start command

Have you recently added a new node or upgraded a node? You are using a quite old version of Node-RED with a no-linger-supported version of nodejs.  
If you can it would be worth upgrading using the script on the raspberry pi page in the docs and seeing if that fixes your issue

---

<div class="post-metadata">

**Author:** ![myozone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myozone/32/8904_2.png) [@myozone](https://discourse.nodered.org/u/myozone)\
**Post date:** [1 June 2019 09:02 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/3 "2019-06-01T09:02:30Z")

</div>

No updates or anything, it appeared to go down around 01:30 this morning - all on it's own - it sends data to another PI with Grafana.

I issued an stop node-red and got this :-

pi@raspberrypi:~ $ node-red stop  
1 Jun 09:59:09 - [info]

# Welcome to Node-RED

1 Jun 09:59:09 - [info] Node-RED version: v0.18.7  
1 Jun 09:59:09 - [info] Node.js version: v6.14.4  
1 Jun 09:59:09 - [info] Linux 4.9.35-v7+ arm LE  
1 Jun 09:59:11 - [info] Loading palette nodes  
1 Jun 09:59:17 - [warn] [chart request] Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument  
1 Jun 09:59:17 - [warn] [chart response] Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument  
1 Jun 09:59:18 - [info] Dashboard up and running  
1 Jun 09:59:28 - [info] Worldmap version 1.5.30  
1 Jun 09:59:29 - [info] Dashboard version 2.14.0 started at /ui  
1 Jun 09:59:31 - [info] Settings file : /home/pi/.node-red/settings.js  
1 Jun 09:59:31 - [info] User directory : /home/pi/.node-red  
1 Jun 09:59:31 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable  
1 Jun 09:59:31 - [info] Flows file : /home/pi/.node-red/stop  
1 Jun 09:59:31 - [info] Creating new flow file  
1 Jun 09:59:31 - [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.

1 Jun 09:59:31 - [info] Starting flows  
1 Jun 09:59:31 - [info] Started flows  
1 Jun 09:59:31 - [red] Uncaught Exception:  
1 Jun 09:59:31 - Error: listen EADDRINUSE 0.0.0.0:1880  
at Object.exports.\_errnoException (util.js:1020:11)  
at exports.\_exceptionWithHostPort (util.js:1043:20)  
at Server.\_listen2 (net.js:1271:14)  
at listen (net.js:1307:10)  
at net.js:1417:9  
at \_combinedTickCallback (internal/process/next\_tick.js:83:11)  
at process.\_tickCallback (internal/process/next\_tick.js:104:9)  
pi@raspberrypi:~ $

---

<div class="post-metadata">

**Author:** ![myozone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myozone/32/8904_2.png) [@myozone](https://discourse.nodered.org/u/myozone)\
**Post date:** [1 June 2019 09:47 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/4 "2019-06-01T09:47:55Z")

</div>

I also have Pi-hole running but that's using the IP but on /admin - it's been running on the same pi for years

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [1 June 2019 12:34 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/5 "2019-06-01T12:34:00Z")

</div>

> [@myozone](#):
>
> 1 Jun 09:59:31 - [info] Flows file : /home/pi/.node-red/stop  
> 1 Jun 09:59:31 - [info] Creating new flow file

Something strange there because it has started node-red with a flow file override called "stop" which clearly doesn't exist.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [1 June 2019 12:51 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/6 "2019-06-01T12:51:22Z")

</div>

Caused by using the command

`node-red stop`

rather the stop command

```auto
node-red-stop

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [1 June 2019 13:53 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/7 "2019-06-01T13:53:08Z")

</div>

my guess is he tried to stop node red using `node-red stop`

This resulted in not only NOT stopping existing node-red instance but actually starting another and attempting to load a flow called `stop`. A clue here is port 1880 already in use.

If the op had written `node-red-stop` it would have stopped node-red instead of trying to launch again

NOTE: this is assuming linux/RPi (windows doesnt do `node-red-stop`)

---

<div class="post-metadata">

**Author:** ![myozone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myozone/32/8904_2.png) [@myozone](https://discourse.nodered.org/u/myozone)\
**Post date:** [1 June 2019 14:43 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/8 "2019-06-01T14:43:33Z")

</div>

I think that's what I did, a node-red stop rather than node-red-stop, I incorrectly assumed they were the same thing. But I still have the issue

I reloaded an old image file I had - that appears ok. Then I reloaded the flows file and that started the problem so it must be a problem within a flow. I can't see why it would wrong during the night with no input from me.?

It's horrible when you get the sinking feeling when you've lost weeks of work messing, fine tuning and it goes wrong !😢

---

<div class="post-metadata">

**Author:** ![myozone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myozone/32/8904_2.png) [@myozone](https://discourse.nodered.org/u/myozone)\
**Post date:** [1 June 2019 19:22 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/9 "2019-06-01T19:22:56Z")

</div>

After experimenting all day I have my flows back - however, not running - this is the error

Flows stopped due to missing node types.

- twitter-credentials
- twitter out

I removed a Twitter node and the credentials node but still get the error ?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 June 2019 19:54 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/10 "2019-06-01T19:54:19Z")

</div>

You still have some twitter related nodes in the flow. When you deploy do you see an Unused Config Nodes message? If so then delete those. If you still get the error then use the Search feature to search for twitter.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [1 June 2019 22:32 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/11 "2019-06-01T22:32:35Z")

</div>

Use search 'ctrl+f' and search Twitter. You'll find remnants typically config nodes. Delete and deploy.

---

<div class="post-metadata">

**Author:** ![myozone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myozone/32/8904_2.png) [@myozone](https://discourse.nodered.org/u/myozone)\
**Post date:** [2 June 2019 08:50 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/12 "2019-06-02T08:50:34Z")

</div>

I deleted the one Twitter node and the credentials. I think I deleted Twitter with an undelete( sudo npm uninstall -g node-red-node-twitter --save) but I still have a greyed out node-red-node-twitter in the pallet. (If I hit update it fails)

![40](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/7dde1adb89ae73f5814dc6a0a140de22afebd34a.jpeg)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 June 2019 09:23 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/13 "2019-06-02T09:23:28Z")

</div>

Did you install it using -g? Normally one would not do that. What do you see in the terminal if you run  
npm uninstall node-red-node-twitter  
I hope you made a backup of your flows file before you started experimenting in order to avoid the risk of losing everything that you mentioned earlier.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [2 June 2019 09:35 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/14 "2019-06-02T09:35:21Z")

</div>

The twitter node was originally part of the "core" Node-RED nodes and was therefore loaded as a global node. The version that is installed no longer works as twitter changed its API.

The upgrade script I suggested you ran in the first reply in this thread would get you onto a supported version of nodejs, upgrade Node-RED to the latest version and upgrade all the nodes.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [2 June 2019 09:39 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/15 "2019-06-02T09:39:28Z")

</div>

> [@ukmoose](#):
>
> The twitter node was originally part of the "core" Node-RED nodes a

Ah yes, I had forgotten that. As you say, the best thing is to run the upgrade script. After making sure everything important is backed up of course.

---

<div class="post-metadata">

**Author:** ![myozone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myozone/32/8904_2.png) [@myozone](https://discourse.nodered.org/u/myozone)\
**Post date:** [2 June 2019 09:47 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/16 "2019-06-02T09:47:35Z")

</div>

Yes I have two images, one the non working one and the other a quite old one.  
I've used the the old image and the backup file of the flows form the none working one, at least I can see my non running flows.

What gets me is when I reload the old flows they work, but the non working one doesn't, even with the Twitter node greyed out in both instances. The new non working flow I can't find any reference to Twitter using ctrl-f.

Whats the best way to update sudo apt-get update sudo apt-get dist-upgrade ?

One thought just crossed my mind. Would downloading a new PI install then reinstall my flows work. The PI has has and still does many things on it an email server, ads-b, pi-hole, transmission, + loads of downloaded files. (32gb SD)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [2 June 2019 10:02 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/17 "2019-06-02T10:02:05Z")

</div>

Nope, the best way to upgrade is

> [@ukmoose](#):
>
> If you can it would be worth upgrading using the script on the raspberry pi page in the docs and seeing if that fixes your issue

---

<div class="post-metadata">

**Author:** ![myozone](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/myozone/32/8904_2.png) [@myozone](https://discourse.nodered.org/u/myozone)\
**Post date:** [2 June 2019 10:17 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/18 "2019-06-02T10:17:15Z")

</div>

This one ?,

#!/bin/bash

echo ""  
echo "Updating/Upgrading Raspbian"  
apt-get -y update  
apt-get -y upgrade  
apt-get -y dist-upgrade  
apt-get -y install rpi-update  
rpi-update  
echo "Updating/Upgrading completed"  
echo ""

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [2 June 2019 10:21 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/19 "2019-06-02T10:21:29Z")

</div>

The one in the Install/Upgrade section of the page “running on Raspberry Pi” in the docs

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 June 2019 10:24 UTC](https://discourse.nodered.org/t/node-red-stopped-working/11741/20 "2019-06-02T10:24:20Z")

</div>

just in case - [https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi)

[Next page](https://discourse.nodered.org/t/node-red-stopped-working/11741.md?page=2)
