# Node-red-pi not found?

**URL:** <https://discourse.nodered.org/t/node-red-pi-not-found/80542>\
**Category:** General\
**Created:** [13 August 2023 19:48 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542 "2023-08-13T19:48:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![endy12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/endy12/32/82015_2.png) [@endy12](https://discourse.nodered.org/u/endy12)\
**Post date:** [13 August 2023 19:48 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/1 "2023-08-13T19:48:58Z")

</div>

Please, can any1 help me with these errors in /var/logs/syslog  
Stopped Node-RED graphical event wiring tool.  
Started Node-RED graphical event wiring tool.  
/usr/bin/env: ‘node-red-pi’: No such file or directory  
nodered.service: Main process exited, code=exited, status=127/n/a  
nodered.service: Failed with result 'exit-code'.  
nodered.service: Scheduled restart job, restart counter is at 36.  
Stopped Node-RED graphical event wiring tool.  
Started Node-RED graphical event wiring tool.  
/usr/bin/env: ‘node-red-pi’: No such file or directory  
nodered.service: Main process exited, code=exited, status=127/n/a  
nodered.service: Failed with result 'exit-code'.  
nodered.service: Scheduled restart job, restart counter is at 37.  
Stopped Node-RED graphical event wiring tool.  
Started Node-RED graphical event wiring tool.  
/usr/bin/env: ‘node-red-pi’: No such file or directory  
nodered.service: Main process exited, code=exited, status=127/n/a  
nodered.service: Failed with result 'exit-code'.  
nodered.service: Scheduled restart job, restart counter is at 38.  
Stopped Node-RED graphical event wiring tool.  
Started Node-RED graphical event wiring tool.  
/usr/bin/env: ‘node-red-pi’: No such file or directory  
nodered.service: Main process exited, code=exited, status=127/n/a  
nodered.service: Failed with result 'exit-code'.

I have no clue as where to look for the missing config or what ☹

---

<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:** [13 August 2023 20:19 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/2 "2023-08-13T20:19:03Z")

</div>

How did you install node red and how are you running it.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [13 August 2023 20:36 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/3 "2023-08-13T20:36:44Z")

</div>

I guess you are on a Raspberry Pi?

It's probably a good idea to [re]run the installation script:

```auto
cd
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) --node18

```

Assuming it installs OK, Node-red should run automatically when you reboot, but for the first test, run `node-red-start`. You will see warnings but hopefully no errors.  
When you have checked that it's running, `CTRL C` will stop it.

---

<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:** [13 August 2023 20:53 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/4 "2023-08-13T20:53:02Z")

</div>

> [@jbudd](#):
>
> Node-red should run automatically when you reboot

I am not certain but I think it defaults to not running automatically. To run node-red automatically on boot then run  
`sudo systemctl enable nodered`  
and the next time it boots node red will start. Use `disable` to stop it running automatically.

> [@jbudd](#):
>
> for the first test, run `node-red-start`. You will see warnings but hopefully no errors.  
> When you have checked that it's running, `CTRL C` will stop it.

A small clarification there. CTRL C will stop the log appearing in the terminal but will not stop node red, as node-red-start starts it as a service. To stop node-red when running as a service use `node-red-stop`.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [13 August 2023 21:06 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/5 "2023-08-13T21:06:15Z")

</div>

Thanks for the clarification about node-red-start & node-red-stop Colin. I never use those commands myself, I always use` sudo systemctl stop nodered` & sudo `systemctl restart nodered` but if you tell people that there's a 50% chance they assume you accidentally omitted a hyphen! That's why I mentioned rebooting.

The installation script has definitely always enabled Node-red for me on Raspberry Pi, though it's been a while since I installed it and didn't see a warning about non-standard systemd script. Maybe it will not enable it in those circumstances.  
I must get round to investigating that.

---

<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:** [13 August 2023 21:15 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/6 "2023-08-13T21:15:51Z")

</div>

> [@jbudd](#):
>
> The installation script has definitely always enabled Node-red for me on Raspberry Pi

Once you have enabled it, running the script will not disable it. The question is whether the first install enables it or not. I may well be wrong though.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [13 August 2023 21:54 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/7 "2023-08-13T21:54:27Z")

</div>

OK I just disabled it, ran the install script and no it's not automatically enabled. Sorry for the misinformation.

---

<div class="post-metadata">

**Author:** ![endy12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/endy12/32/82015_2.png) [@endy12](https://discourse.nodered.org/u/endy12)\
**Post date:** [14 August 2023 06:12 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/8 "2023-08-14T06:12:34Z")

</div>

Actually I'm on Odroid HC4.. but since there were not explicit guides as how to install node red on this, i used rpi guide..  
nodered is working fine on it, however i just discovered it is feeding this error into syslog and I'd like to mend it.

---

<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:** [14 August 2023 06:45 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/9 "2023-08-14T06:45:52Z")

</div>

Do you mean you ran the bash \<(curl command?

---

<div class="post-metadata">

**Author:** ![endy12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/endy12/32/82015_2.png) [@endy12](https://discourse.nodered.org/u/endy12)\
**Post date:** [14 August 2023 06:46 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/10 "2023-08-14T06:46:54Z")

</div>

Right..  
I think I used this guide:  
[https://nodered.org/docs/getting-started/raspberrypi](https://nodered.org/docs/getting-started/raspberrypi)

---

<div class="post-metadata">

**Author:** ![endy12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/endy12/32/82015_2.png) [@endy12](https://discourse.nodered.org/u/endy12)\
**Post date:** [14 August 2023 06:48 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/11 "2023-08-14T06:48:54Z")

</div>

I tried to run this command manually and it works ok node-red-pi..  
So what I actually need to find, what is trying to run this program...

Aug 13 00:01:33 odroid Node-RED[1737695]: /usr/bin/env: \<80\>\<98\>node-red-pi\<80\>\<99\>: No such file or 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:** [14 August 2023 07:53 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/12 "2023-08-14T07:53:30Z")

</div>

What does  
`sudo systemctl status nodered`  
show?  
If it refers to a service file, possibly it will show  
`Loaded: loaded (/lib/systemd/system/nodered.service; enabled; vendor preset: enabled)`  
then what is in that file?

---

<div class="post-metadata">

**Author:** ![endy12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/endy12/32/82015_2.png) [@endy12](https://discourse.nodered.org/u/endy12)\
**Post date:** [14 August 2023 08:01 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/13 "2023-08-14T08:01:16Z")

</div>

> [@Colin](#):
>
> sudo systemctl status nodered

odroid@odroid:~$ sudo systemctl status nodered  
[sudo] password for odroid:  
● nodered.service - Node-RED graphical event wiring tool  
Loaded: loaded (/lib/systemd/system/nodered.service; enabled; vendor preset: enabled)  
Active: activating (auto-restart) (Result: exit-code) since Mon 2023-08-14 09:59:30 CEST; 17s ago  
Docs: [Redirecting…](http://nodered.org/docs/hardware/raspberrypi.html)  
Process: 33984 ExecStart=/usr/bin/env node-red-pi $NODE\_OPTIONS $NODE\_RED\_OPTIONS (code=exited, status=127)  
Main PID: 33984 (code=exited, status=127)

---

<div class="post-metadata">

**Author:** ![endy12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/endy12/32/82015_2.png) [@endy12](https://discourse.nodered.org/u/endy12)\
**Post date:** [14 August 2023 08:01 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/14 "2023-08-14T08:01:52Z")

</div>

Halleluja.. it is here:

odroid@odroid:~$ more /lib/systemd/system/nodered.service

# systemd service file to start Node-RED

[Unit]  
Description=Node-RED graphical event wiring tool  
Wants=network.target  
Documentation=[Redirecting…](http://nodered.org/docs/hardware/raspberrypi.html)

[Service]  
Type=simple

# Run as normal pi user - change to the user name you wish to run Node-RED as

User=odroid  
Group=odroid  
WorkingDirectory=/home/odroid

Environment="NODE\_OPTIONS=--max\_old\_space\_size=1024"

# define an optional environment file in Node-RED's user directory to set custom variables externally

EnvironmentFile=-/home/odroid/.node-red/EnvironmentFile

# uncomment and edit next line if you need an http proxy

#Environment="HTTP\_PROXY=my.httpproxy.server.address"

# uncomment the next line for a more verbose log output

#Environment="NODE\_RED\_OPTIONS=-v"

# uncomment next line if you need to wait for time sync before starting

#ExecStartPre=/bin/bash -c '/bin/journalctl -b -u systemd-timesyncd | /bin/grep -q "systemd-timesyncd.\* Synchronized to time server"'

**ExecStart=/usr/bin/env node-red-pi $NODE\_OPTIONS $NODE\_RED\_OPTIONS**  
#ExecStart=/usr/bin/env node $NODE\_OPTIONS red.js $NODE\_RED\_OPTIONS

# Use SIGINT to stop

KillSignal=SIGINT

# Auto restart on crash

Restart=on-failure  
RestartSec=20

# Tag things in the log

SyslogIdentifier=Node-RED  
#StandardOutput=syslog

[Install]  
WantedBy=multi-user.target  
odroid@odroid:~$

---

<div class="post-metadata">

**Author:** ![endy12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/endy12/32/82015_2.png) [@endy12](https://discourse.nodered.org/u/endy12)\
**Post date:** [14 August 2023 08:06 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/15 "2023-08-14T08:06:10Z")

</div>

But I think, this actually causes my node red to start and work OK..

One more thing I noticed in syslog the lines looks like this:

```auto

Aug 13 00:01:54 odroid Node-RED[1737704]: /usr/bin/env: <E2><80><98>node-red-pi<E2><80><99>: No such file or directory

```

See the \<80\> \<98\>  
(this editor actually doesn't want to show \< E 2 \> if I type it together..  
This looks like some kind of quation mark or something I copied from the web.. and this causes probably something to not be able to execute node-red-pi

---

<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:** [14 August 2023 08:42 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/16 "2023-08-14T08:42:19Z")

</div>

> [@endy12](#):
>
> But I think, this actually causes my node red to start and work OK

How are you running node red? The command to run it as a service is  
`node-red-start`

Does this command run?  
`/usr/bin/env`  
It should show the current environment.

If you edit your previous post with the service file and add triple backticks before and after the file then it will stop the forum from interpreting the file as markdown and messing with the formatting.

---

<div class="post-metadata">

**Author:** ![endy12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/endy12/32/82015_2.png) [@endy12](https://discourse.nodered.org/u/endy12)\
**Post date:** [14 August 2023 10:04 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/17 "2023-08-14T10:04:18Z")

</div>

Yes, I run it as a service (after odroid restarts, nodered starts automatically).

This is the result of /usr/bin/env

```auto
odroid@odroid:~$ /usr/bin/env
SHELL=/bin/bash
GTK_MODULES=appmenu-gtk-module
PWD=/home/odroid
LOGNAME=odroid
XDG_SESSION_TYPE=tty
MOTD_SHOWN=pam
HOME=/home/odroid
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
SSH_CONNECTION=192.168.0.183 53958 192.168.0.181 22
LESSCLOSE=/usr/bin/lesspipe %s %s
XDG_SESSION_CLASS=user
TERM=xterm
LESSOPEN=| /usr/bin/lesspipe %s
USER=odroid
SHLVL=1
UBUNTU_MENUPROXY=1
XDG_SESSION_ID=22
XDG_RUNTIME_DIR=/run/user/1000
SSH_CLIENT=192.168.0.183 53958 22
XDG_DATA_DIRS=/home/odroid/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/usr/local/lib/nodejs/node-v18.16.0-linux-arm64/bin:/usr/local/lib/nodejs/node-v18.16.0-linux-arm64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
SSH_TTY=/dev/pts/0
_=/usr/bin/env
odroid@odroid:~$

```

---

<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:** [14 August 2023 10:39 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/18 "2023-08-14T10:39:44Z")

</div>

> [@endy12](#):
>
> Yes, I run it as a service

What do you see if you run  
`node-red-stop`  
`node-red-start`  
Which should stop node red then start it again as a service.

---

<div class="post-metadata">

**Author:** ![endy12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/endy12/32/82015_2.png) [@endy12](https://discourse.nodered.org/u/endy12)\
**Post date:** [14 August 2023 12:40 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/19 "2023-08-14T12:40:23Z")

</div>

> [@Colin](#):
>
> node-red-stop

```auto
odroid@odroid:~$ node-red-stop
Stop Node-RED

Use node-red-start to start Node-RED again
[sudo] password for odroid:

odroid@odroid:~$

```

and then start:

```auto
odroid@odroid:~$ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.0.181:1880
On Pi Node-RED works better with the Firefox or Chrome browser

Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot

To find more nodes and example flows - go to http://flows.nodered.org

Starting as a systemd service.
nodered.service: Scheduled restart job, restart counter is at 3034.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
/usr/bin/env: ‘node-red-pi’: No such file or directory
nodered.service: Main process exited, code=exited, status=127/n/a
nodered.service: Failed with result 'exit-code'.

```

---

<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:** [14 August 2023 12:57 UTC](https://discourse.nodered.org/t/node-red-pi-not-found/80542/20 "2023-08-14T12:57:34Z")

</div>

So node red won't run as a service, I can only guess that the env when running as a service does not have /usr/bin in the path. You could edit the service file and change node-red-pi to /usr/bin/node-red-pi

> [@endy12](#):
>
> Yes, I run it as a service (after odroid restarts, nodered starts automatically).

Have you done something to cause that, other than using the normal service file?

[Next page](https://discourse.nodered.org/t/node-red-pi-not-found/80542.md?page=2)
