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
It's probably a good idea to [re]run the installation script:
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.
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.
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.
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.
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.
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.
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?
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:
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
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.
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:
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'.
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
Have you done something to cause that, other than using the normal service file?