# Can't run node-red

**URL:** <https://discourse.nodered.org/t/cant-run-node-red/2019>\
**Category:** General\
**Created:** [2 August 2018 23:59 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019 "2018-08-02T23:59:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uspinhal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/uspinhal/32/1518_2.png) [@Uspinhal](https://discourse.nodered.org/u/Uspinhal)\
**Post date:** [2 August 2018 23:59 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/1 "2018-08-02T23:59:08Z")

</div>

Hi everyone.  
I'm starting with Node-RED on a RPi 3 running Raspbian Scratch, and I just can't start Node-red.  
I tried with `node-red-start` command and with `sudo systemctl start nodered.service`  
Both ways return something like this:

> nodered.service - Node-RED graphical event wiring tool  
> Loaded: loaded (/lib/systemd/system/nodered.service; enabled; vendor preset: enabled)  
> Active: failed (Result: exit-code) since Thu 2018-08-02 20:50:41 -03; 6s ago  
> Docs: [Redirecting…](http://nodered.org/docs/hardware/raspberrypi.html)  
> Process: 9869 ExecStart=/usr/bin/env node-red-pi $PI\_NODE\_OPTIONS $NODE\_RED\_OPTIONS (code=exited, status=217/USER)  
> Main PID: 9869 (code=exited, status=217/USER)
> 
> ago 02 20:50:41 RaspberryPi systemd[1]: nodered.service: Failed with result 'exit-code'.  
> ago 02 20:50:41 RaspberryPi systemd[1]: nodered.service: Service hold-off time over, scheduling restart.  
> ago 02 20:50:41 RaspberryPi systemd[1]: Stopped Node-RED graphical event wiring tool.  
> ago 02 20:50:41 RaspberryPi systemd[1]: nodered.service: Start request repeated too quickly.  
> ago 02 20:50:41 RaspberryPi systemd[1]: Failed to start Node-RED graphical event wiring tool.  
> ago 02 20:50:41 RaspberryPi systemd[1]: nodered.service: Unit entered failed state.  
> ago 02 20:50:41 RaspberryPi systemd[1]: nodered.service: Failed with result 'exit-code'.

Someone could give a clue about what is happening.

Thanks a lot  
Pinhal

---

<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:** [3 August 2018 08:21 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/2 "2018-08-03T08:21:53Z")

</div>

How have you installed node-red?  
What username are you using to run the command?

---

<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:** [3 August 2018 09:53 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/3 "2018-08-03T09:53:55Z")

</div>

The command  
node-red-log  
should give more detail, but first, as @ukmoose asked, it is important to know how you installed node-red and whether you installed/updated it using the bash \<(curl script in the installation docs [1]. If you haven't run that script then do so first. Also read through those docs as it will give other useful pointers to running on a pi.

[1] [https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi)

---

<div class="post-metadata">

**Author:** ![Uspinhal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/uspinhal/32/1518_2.png) [@Uspinhal](https://discourse.nodered.org/u/Uspinhal)\
**Post date:** [3 August 2018 15:24 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/4 "2018-08-03T15:24:40Z")

</div>

Well, I did not installed node-red itself, it supposed to be installed on raspbian distribution.  
@ukmoose I'm using the same username I use to log on a Pi, I don't know how to use another one.

---

<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:** [3 August 2018 15:28 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/5 "2018-08-03T15:28:46Z")

</div>

As @Colin said - Run the script. The version preinstalled with raspbian is a bit behind.  
[https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi)

---

<div class="post-metadata">

**Author:** ![Uspinhal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/uspinhal/32/1518_2.png) [@Uspinhal](https://discourse.nodered.org/u/Uspinhal)\
**Post date:** [3 August 2018 15:55 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/6 "2018-08-03T15:55:06Z")

</div>

I tried to run the bash script as @Colin said but apparently it couldn't install the node.js package

> Running Node-RED install for user pinhal at /home/pinhal
> 
> This can take 20-30 minutes on the slower Pi versions - please wait.
> 
> Stop Node-RED ✔  
> Remove old version of Node-RED ✔  
> Remove old version of Node.js ✔  
> Install Node.js LTS ✘ Failed to install Node.js - Exit  
> Clean npm cache  
> Install Node-RED core  
> Move global nodes to local  
> Install extra Pi nodes  
> Npm rebuild existing nodes  
> Add menu shortcut  
> Update systemd script

---

<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:** [3 August 2018 15:55 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/7 "2018-08-03T15:55:49Z")

</div>

The latest raspbian image no longer includes node-red by default. Run the update script you've been pointed at and you'll get it.

---

<div class="post-metadata">

**Author:** ![Uspinhal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/uspinhal/32/1518_2.png) [@Uspinhal](https://discourse.nodered.org/u/Uspinhal)\
**Post date:** [3 August 2018 16:05 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/8 "2018-08-03T16:05:11Z")

</div>

Nope, it just dont wanna install node.js on my Pi  
It retuns the same error.  
I tried to install manually but get the same results.

---

<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:** [3 August 2018 16:29 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/9 "2018-08-03T16:29:02Z")

</div>

The output normally points you at a log file to get more detailed information about the failure. I don't recall the exact path, but can you check it?

---

<div class="post-metadata">

**Author:** ![Uspinhal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/uspinhal/32/1518_2.png) [@Uspinhal](https://discourse.nodered.org/u/Uspinhal)\
**Post date:** [3 August 2018 16:38 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/10 "2018-08-03T16:38:46Z")

</div>

This is the last information on the log file:

> ```
> nstalling the NodeSource Node.js 8.x LTS Carbon repo...
> 
> ## Populating apt-get cache...
> 
> + apt-get update
> Obter:1 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17,5 kB]
> Atingido:2 http://repo.mosquitto.org/debian stretch InRelease
> Atingido:3 http://archive.raspbian.org/raspbian stretch InRelease
> Atingido:4 http://archive.raspberrypi.org/debian stretch InRelease
> Ign:5 http://repo.mosquitto.org/debian wheezy InRelease
> Err:6 http://repo.mosquitto.org/debian wheezy Release
> 404 Not Found [IP: 85.119.83.194 80]
> Ign:7 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
> Obter:8 https://dl.bintray.com/openhab/apt-repo2 stable Release [6.051 B]
> Atingido:8 https://dl.bintray.com/openhab/apt-repo2 stable Release
> Ign:1 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
> Lendo listas de pacotes...
> E: The repository 'http://repo.mosquitto.org/debian wheezy Release' does no longer have a Release file.
> W: Erro GPG: http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY C2518248EEA14886
> W: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease' is not signed.
> Error executing command, exiting
> Lendo listas de pacotes...
> Construindo árvore de dependências...
> Lendo informação de estado...
> The following additional packages will be installed:
> libc-ares2 libhttp-parser2.8 nodejs-doc
> Os NOVOS pacotes a seguir serão instalados:
> libc-ares2 libhttp-parser2.8 nodejs nodejs-doc
> 0 pacotes atualizados, 4 pacotes novos instalados, 0 a serem removidos e 70 não atualizados.
> É preciso baixar 0 B/5.001 kB de arquivos.
> Depois desta operação, 22,0 MB adicionais de espaço em disco serão usados.
> A seleccionar pacote anteriormente não seleccionado libc-ares2:armhf.
> (Lendo banco de dados ... 
> (Lendo banco de dados ... 5%
> (Lendo banco de dados ... 10%
> (Lendo banco de dados ... 15%
> (Lendo banco de dados ... 20%
> (Lendo banco de dados ... 25%
> (Lendo banco de dados ... 30%
> (Lendo banco de dados ... 35%
> (Lendo banco de dados ... 40%
> (Lendo banco de dados ... 45%
> (Lendo banco de dados ... 50%
> (Lendo banco de dados ... 55%
> (Lendo banco de dados ... 60%
> (Lendo banco de dados ... 65%
> (Lendo banco de dados ... 70%
> (Lendo banco de dados ... 75%
> (Lendo banco de dados ... 80%
> (Lendo banco de dados ... 85%
> (Lendo banco de dados ... 90%
> (Lendo banco de dados ... 95%
> (Lendo banco de dados ... 100%
> (Lendo banco de dados ... 119505 ficheiros e directórios actualmente instalados.)
> A preparar para desempacotar .../libc-ares2_1.14.0-1~bpo9+1_armhf.deb ...
> A descompactar libc-ares2:armhf (1.14.0-1~bpo9+1) ...
> A seleccionar pacote anteriormente não seleccionado libhttp-parser2.8:armhf.
> A preparar para desempacotar .../libhttp-parser2.8_2.8.1-1~bpo9+1_armhf.deb ...
> A descompactar libhttp-parser2.8:armhf (2.8.1-1~bpo9+1) ...
> A seleccionar pacote anteriormente não seleccionado nodejs.
> A preparar para desempacotar .../nodejs_8.11.1~dfsg-2~bpo9+1_armhf.deb ...
> A descompactar nodejs (8.11.1~dfsg-2~bpo9+1) ...
> A seleccionar pacote anteriormente não seleccionado nodejs-doc.
> A preparar para desempacotar .../nodejs-doc_8.11.1~dfsg-2~bpo9+1_all.deb ...
> A descompactar nodejs-doc (8.11.1~dfsg-2~bpo9+1) ...
> Configurando nodejs-doc (8.11.1~dfsg-2~bpo9+1) ...
> A processar 'triggers' para libc-bin (2.24-11+deb9u3) ...
> A processar 'triggers' para man-db (2.7.6.1-2) ...
> Configurando libc-ares2:armhf (1.14.0-1~bpo9+1) ...
> Configurando libhttp-parser2.8:armhf (2.8.1-1~bpo9+1) ...
> Configurando nodejs (8.11.1~dfsg-2~bpo9+1) ...
> update-alternatives: a usar /usr/bin/nodejs para disponibilizar /usr/bin/js (js) em modo auto
> A processar 'triggers' para libc-bin (2.24-11+deb9u3) ...
> 
> ```

Sorry about some informations in Portuguese 😊

---

<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:** [3 August 2018 19:05 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/11 "2018-08-03T19:05:55Z")

</div>

Go into the /etc/apt/sources.list.d directory and remove the nodesources.list file. Then (as pi user) rerun the install script

---

<div class="post-metadata">

**Author:** ![Uspinhal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/uspinhal/32/1518_2.png) [@Uspinhal](https://discourse.nodered.org/u/Uspinhal)\
**Post date:** [3 August 2018 20:02 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/12 "2018-08-03T20:02:56Z")

</div>

There isn't this file in the sources.list.d directory

---

<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:** [3 August 2018 21:15 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/13 "2018-08-03T21:15:48Z")

</div>

That doesn't look like a node-red problem. Why are you referencing the wheezy repository for mosquitto? I would have expected it to be from the stretch repo.

---

<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:** [3 August 2018 21:45 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/14 "2018-08-03T21:45:13Z")

</div>

Hmmm. If that dir is not there then it’s odd that the script is not “doing the right thing”. What does. node -v. report. And also npm -v. ?

---

<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:** [4 August 2018 06:38 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/15 "2018-08-04T06:38:24Z")

</div>

@dceejay the mosquitto and Java entries won't be in the nodesources file will they?

---

<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:** [4 August 2018 06:57 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/16 "2018-08-04T06:57:03Z")

</div>

No, it only points to the nodejs repository.

---

<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:** [4 August 2018 07:03 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/17 "2018-08-04T07:03:46Z")

</div>

> [@dceejay](#):
>
> No, it only points to the nodejs repository.

That's what I thought.  
@Uspinhal try running, in a terminal  
sudo apt-get update  
I expect that to fail due to some problems with your apt sources list. You need to sort those first before you will be able to install or update anything at all.

---

<div class="post-metadata">

**Author:** ![Uspinhal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/uspinhal/32/1518_2.png) [@Uspinhal](https://discourse.nodered.org/u/Uspinhal)\
**Post date:** [9 August 2018 03:47 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/18 "2018-08-09T03:47:51Z")

</div>

Sorry about return.  
I try to install all over again since Raspbian and finally I got all running.  
Thanks a lot for all the help.

---

<div class="post-metadata">

**Author:** ![Mks121](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Mks121](https://discourse.nodered.org/u/Mks121)\
**Post date:** [8 December 2018 16:56 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/19 "2018-12-08T16:56:11Z")

</div>

hello ,

I've installed the node-red on Debian Jessie successfully and everything works fine .until I was trying to create startup file and enable the auto start that I realized the node-red is not opening and stuck in login page and keep running...  
it sounds to me the "Node-RED graphical event wiring tool" and this is the log file .please help me if you know to fix it ☹

root@ts-imx6ul:~# node-red-log

Stopping Node-RED graphical event wiring tool...  
Starting Node-RED graphical event wiring tool...  
Started Node-RED graphical event wiring tool.  
nodered.service: main process exited, code=exited, status=217/USER  
Unit nodered.service entered failed state.  
nodered.service holdoff time over, scheduling restart.  
Stopping Node-RED graphical event wiring tool...  
Starting Node-RED graphical event wiring tool...  
Started Node-RED graphical event wiring tool.  
Failed at step USER spawning /usr/bin/env: No such process  
nodered.service: main process exited, code=exited, status=217/USER  
Unit nodered.service entered failed state.  
nodered.service holdoff time over, scheduling restart.  
Stopping Node-RED graphical event wiring tool...  
Starting Node-RED graphical event wiring tool...  
Started Node-RED graphical event wiring tool.  
Failed at step USER spawning /usr/bin/env: No such process  
nodered.service: main process exited, code=exited, status=217/USER  
Unit nodered.service entered failed state.  
nodered.service holdoff time over, scheduling restart.  
Stopping Node-RED graphical event wiring tool...  
Starting Node-RED graphical event wiring tool...  
nodered.service start request repeated too quickly, refusing to start.  
Failed to start Node-RED graphical event wiring tool.  
Unit nodered.service entered failed state.  
^Croot@ts-imx6ul:~# node-red-stop

---

<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:** [8 December 2018 17:12 UTC](https://discourse.nodered.org/t/cant-run-node-red/2019/20 "2018-12-08T17:12:27Z")

</div>

How are you trying to make Node-RED autostart?  
I’m pretty sure that the systemd scripts assume you are running as user pi, as there is very little justification to run as root.

This error is a systemd error rather than Node-RED caused by this

[Next page](https://discourse.nodered.org/t/cant-run-node-red/2019.md?page=2)
