An issue after upgrading to 4.0 (Solved)

Hi,

I just updated node/nodejs from ver 18 to 20 and nodered to 4.0.

Via ssh, when I issue sudo systemctl status nodered.service, the system (rpi 4) reboots.

When I connect to the server, with a browser, via port 1880, I can see and manipulate my flows.

When I check nodered -v, I get:

28 Jun 18:44:52 - [info]

Welcome to Node-RED

28 Jun 18:44:52 - [info] Node-RED version: v4.0.1
28 Jun 18:44:52 - [info] Node.js version: v20.15.0
28 Jun 18:44:52 - [info] Linux 6.6.31+rpt-rpi-v8 arm64 LE
28 Jun 18:44:53 - [info] Loading palette nodes
28 Jun 18:44:55 - [info] Dashboard version 3.6.5 started at /ui
28 Jun 18:44:57 - [info] Settings file : /home/pi/.node-red/settings.js
28 Jun 18:44:57 - [info] Context store : 'default' [module=localfilesystem]
28 Jun 18:44:57 - [info] User directory : /home/pi/.node-red
28 Jun 18:44:57 - [warn] Projects disabled : editorTheme.projects.enabled=false
28 Jun 18:44:57 - [info] Flows file : /home/pi/.node-red/flows.json
28 Jun 18:44:57 - [error] Unable to listen on http://127.0.0.1:1880/
28 Jun 18:44:57 - [error] Error: port in use

and when I check on the ports, I get:

sudo netstat -tulpn | grep LISTEN
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1144/mjpg_streamer
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 824/mosquitto
tcp 0 0 0.0.0.0:1880 0.0.0.0:* LISTEN 625/node-red
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 850/vncserver-x11-c
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 927/sshd: /usr/sbin
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 1150/python
tcp6 0 0 :::8080 :::* LISTEN 1144/mjpg_streamer
tcp6 0 0 :::1883 :::* LISTEN 824/mosquitto
tcp6 0 0 :::5900 :::* LISTEN 850/vncserver-x11-c
tcp6 0 0 :::80 :::* LISTEN 1617/apache2
tcp6 0 0 :::22 :::* LISTEN 927/sshd: /usr/sbin
tcp6 0 0 :::443 :::* LISTEN 1617/apache2
tcp6 0 0 ::1:8888 :::* LISTEN 661/pigpiod
tcp6 0 0 :::5000 :::* LISTEN 1150/python

Having said that, what else should I check to see what's causing the reboot?

TIA

UPDATE

Issued a stop/start of the service and the "status" is reporting as designed without causing a reboot.

pi@piserver:~ $ sudo systemctl disable nodered
Removed "/etc/systemd/system/multi-user.target.wants/nodered.service".
pi@piserver:~ $ sudo systemctl enable nodered
Created symlink /etc/systemd/system/multi-user.target.wants/nodered.service → /lib/systemd/system/nodered.service.

Hi, it's node-red --version

Correct, thank you!

node-red -version

Node-RED v4.0.1
Node.js v20.15.0
Linux 6.6.31+rpt-rpi-v8 arm64 LE

That should be systemctl

The port in use message is probably because node red is already running.

The command is systemctl not systemctr.
What happens if you run
systemctl status nodered ? (ie no sudo, .service is unnecessary)

What does which systemctr show you?

It's a typo. Edited, thank you!

systemctr it's a typo.

systemctl status nodered reboots.

Anything GPIO related in your flows?

strange that a 'reboot' is happening when restarting Node RED
Are you using a good Power Supply

That is probably an operating system problem not related to Node-red.

What about a fictional service?

systemctl status nosuch

Check in the system log for clues (accessing the system log depends on your OS version. It used to be /var/log/syslog, now it's journalctl)

1 Like

Yes, it comes from a UPS.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.