node-red-start/stop commands are not working. Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Mr.Panda
Posts: 16
Joined: Tue Oct 19, 2021 11:11 am

node-red-start/stop commands are not working.

Post by Mr.Panda »

Hi,

I am very new to this. I installed Node-Red on DietPi. When using Raspberry Pi OS, I was starting Node-RED with

Code: Select all

node-red-start
and then stopping it with

Code: Select all

node-red-stop
. But in DietPi, I am getting following error:

Code: Select all

/usr/bin/node-red-stop: line 1: dietpi-services: command not found
However running

Code: Select all

node-red-log
starts the Node-RED.

What is the problem?

Thanks.

Edit: I can see `node-red-start` and `node-red-stop` under `/usr/bin`.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: node-red-start/stop commands are not working.

Post by Joulinar »

Hi,

how did you installed NodeRed? DietPi is offering an own installation script for this. Usually this will setup as well a service that can be started and stopped.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Mr.Panda
Posts: 16
Joined: Tue Oct 19, 2021 11:11 am

Re: node-red-start/stop commands are not working.

Post by Mr.Panda »

Hi @Joulinar,

I installed via dietpi-software.

Code: Select all

dietpi-services start node-red
and

Code: Select all

dietpi-services stop node-red
works fine.

But, I wanted to simulate the behaviour of node-red-start and node-red-stop, hence I added customized scripts to /usr/bin. The difference is node-red-start starts the node-red log as well, hence I can debug during development.

Based on this discussion https://discourse.nodered.org/t/dietpi- ... ds/10388/2, I am now able to simulate the desired behaviour.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: node-red-start/stop commands are not working.

Post by Joulinar »

on DietPi we start Node-Red via systemd service as we store node-red on a custom file system. Command we use is following as user nodered

Code: Select all

/mnt/dietpi_userdata/node-red/node_modules/.bin/node-red -u /mnt/dietpi_userdata/node-red
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply