I think it still running
pi@raspberrypi:~ $ ps -A | grep node-red
2926 ? 00:00:14 node-red
pi@raspberrypi:~ $ kill 2926
bash: kill: (2926) - Operation not permitted
pi@raspberrypi:~ $ kill 2926
bash: kill: (2926) - Operation not permitted
pi@raspberrypi:~ $ sudo kill 2926
pi@raspberrypi:~ $ sudo node-red-stop
Stop Node-RED
Use node-red-start to start Node-RED again
pi@raspberrypi:~ $ sudo node-red-log
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
11 Jul 14:29:27 - [warn] ------------------------------------------------------
11 Jul 14:29:27 - [warn] Missing node modules:
11 Jul 14:29:27 - [warn] - node-red-contrib-mqtt-env (1.0.0): mqtt-env in, mqtt-env out, mqtt-env-broker
11 Jul 14:29:27 - [warn] - node-red-contrib-mqttssl (0.0.5): mqttssl in, mqttssl out, mqttssl-broker
11 Jul 14:29:27 - [info] Removing modules from config
11 Jul 14:29:27 - [info] Settings file : /home/pi/.node-red/settings.js
11 Jul 14:29:27 - [info] Context store : 'default' [module=memory]
11 Jul 14:29:27 - [info] User directory : /home/pi/.node-red
11 Jul 14:29:27 - [warn] Projects disabled : editorTheme.projects.enabled=false
11 Jul 14:29:27 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
11 Jul 14:29:27 - [red] Uncaught Exception:
11 Jul 14:29:27 - Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
at Server.setupListenHandle [as _listen2] (net.js:1313:16)
at listenInCluster (net.js:1361:12)
at doListen (net.js:1498:7)
at processTicksAndRejections (internal/process/task_queues.js:85:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
Stopped Node-RED graphical event wiring tool
Martin10:
Error: port in use
after you (try) to stop node-red, can you check ps -A | grep node-red
again.
node-red-log
will show you last logs - doesnt mean it is running
ā look at the last line
What does ps -A | grep node-red
show now?
pi@raspberrypi:~ $ ps -A | grep node-re
21338 ? 00:00:09 node-red
pi@raspberrypi:~ $ sudo kill 21338
ok, just in case node-red is auto restarting, for now, lets disable the service...
sudo systemctl disable nodered.service
node-red-stop
wait 10 secs
ps -A | grep node-red
if you get a PID, kill it (use sudo if necessary)
wait 10 secs
ps -A | grep node-red
Also, just in case, what does pm2 list
show?
pi@raspberrypi:~ $ sudo systemctl disable nodered.service
pi@raspberrypi:~ $ node-red-stop
Stop Node-RED
Use node-red-start to start Node-RED again
pi@raspberrypi:~ $ ps -A | grep node-red
29037 ? 00:00:07 node-red
pi@raspberrypi:~ $ sudo kill 29037
pi@raspberrypi:~ $ ps -A | grep node-red
2628 ? 00:00:06 node-red
pi@raspberrypi:~ $ pm2 list
bash: pm2: command not found
pi@raspberrypi:~ $ sudo pm2 list
sudo: pm2: command not found
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo systemctl disable nodered.service
pi@raspberrypi:~ $ node-red-stop
Stop Node-RED
Use node-red-start to start Node-RED again
pi@raspberrypi:~ $ ps -A | grep node-red
29037 ? 00:00:07 node-red
pi@raspberrypi:~ $ sudo kill 29037
pi@raspberrypi:~ $ ps -A | grep node-red
2628 ? 00:00:06 node-red
pi@raspberrypi:~ $ pm2 list
bash: pm2: command not found
pi@raspberrypi:~ $ sudo pm2 list
sudo: pm2: command not found
pi@raspberrypi:~ $
most strange.
What does systemctl list-unit-files | grep enabled
show?
pi@raspberrypi:~ $ systemctl list-unit-files | grep enabled
apparmor.service enabled
autovt@.service enabled
avahi-daemon.service enabled
bluetooth.service enabled
console-setup.service enabled
containerd.service enabled
cron.service enabled
dbus-fi.w1.wpa_supplicant1.service enabled
dbus-org.bluez.service enabled
dbus-org.freedesktop.Avahi.service enabled
dbus-org.freedesktop.ModemManager1.service enabled
dbus-org.freedesktop.nm-dispatcher.service enabled
dbus-org.freedesktop.timesync1.service enabled
dhcpcd.service enabled
dhcpcd5.service enabled
docker.service enabled
dphys-swapfile.service enabled
epmd.service enabled
fake-hwclock.service enabled
getty@.service enabled
gldriver-test.service enabled
hciuart.service enabled
influxd.service enabled
influxdb.service enabled
keyboard-setup.service enabled
ModemManager.service enabled
network-manager.service enabled
networking.service enabled
NetworkManager-dispatcher.service enabled
NetworkManager-wait-online.service enabled
NetworkManager.service enabled
nginx.service enabled
pppd-dns.service enabled
raspberrypi-net-mods.service enabled
rc-local.service enabled-runtime
rc.local.service enabled-runtime
rpi-display-backlight.service enabled
rpi-eeprom-update.service enabled
rsync.service enabled
rsyslog.service enabled
ssh.service enabled
sshd.service enabled
sshswitch.service enabled
syslog.service enabled
systemd-fsck-root.service enabled-runtime
systemd-timesyncd.service enabled
teamviewerd.service enabled
triggerhappy.service enabled
udisks2.service enabled
vncserver-x11-serviced.service enabled
wpa_supplicant.service enabled
avahi-daemon.socket enabled
docker.socket enabled
epmd.socket enabled
triggerhappy.socket enabled
nfs-client.target enabled
remote-fs.target enabled
apt-daily-upgrade.timer enabled
apt-daily.timer enabled
logrotate.timer enabled
man-db.timer enabled
You have docker running also?
what does docker container ls --all
show?
pi@raspberrypi:~ $ docker container ls --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b157d8141140 iotstack_nodered "npm start --cache /ā¦" 8 months ago Up 20 minutes (healthy) 0.0.0.0:1880->1880/tcp nodered
d0ffb0dcf660 portainer/portainer "/portainer" 8 months ago Up 4 minutes 0.0.0.0:9000->9000/tcp portainer
6fd87ed6c7ac grafana/grafana "/run.sh" 8 months ago Up 17 hours 0.0.0.0:3000->3000/tcp grafana
3ea298f878b4 pihole/pihole:latest "/s6-init" 8 months ago Up 17 hours (healthy) 0.0.0.0:53->53/udp, 0.0.0.0:53->53/tcp, 0.0.0.0:67->67/udp, 443/tcp, 0.0.0.0:8089->80/tcp pihole
c00039644b1b eclipse-mosquitto "/docker-entrypoint.ā¦" 8 months ago Up 17 hours 0.0.0.0:1883->1883/tcp mosquitto
12459a4bb6b5 iotstack_python "python ./app.py" 8 months ago Restarting (0) 49 seconds ago python
7d40ae09cda7 influxdb:latest "/entrypoint.sh inflā¦" 8 months ago Created influxdb
37433c30a475 openhab/openhab:2.4.0 "/entrypoint.sh gosuā¦" 8 months ago Up 17 hours openhab
2511dea17770 koenkk/zigbee2mqtt "docker-entrypoint.sā¦" 8 months ago Up 19 seconds zigbee2mqtt
This is why you have port 1880 occupied.
Stop that container.
you have portainer - use that
I stopped docker. Run NR in safe mode and got this, is it normal:
pi@raspberrypi:~ $ ps -A | grep node-red
pi@raspberrypi:~ $ node-red --safe
11 Jul 17:20:48 - [info]
Welcome to Node-RED
===================
11 Jul 17:20:48 - [info] Node-RED version: v1.3.5
11 Jul 17:20:48 - [info] Node.js version: v12.18.4
11 Jul 17:20:48 - [info] Linux 5.4.51-v7l+ arm LE
11 Jul 17:20:49 - [info] Loading palette nodes
11 Jul 17:21:00 - [info] Dashboard up and running
11 Jul 17:21:06 - [info] Dashboard version 2.20.0 started at /ui
11 Jul 17:21:06 - [warn] ------------------------------------------------------
11 Jul 17:21:06 - [warn] [node-red-contrib-usb/adkinit] SyntaxError: Invalid or unexpected token (line:59)
11 Jul 17:21:06 - [warn] [node-red-qnap-blockly/blockly] Type already registered
11 Jul 17:21:06 - [warn] [riot-xbee/riot-xbee] Error: Cannot find module '/home/pi/.node-red/node_modules/riot-xbee/riot-xbee.js'
Require stack:
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js
11 Jul 17:21:06 - [warn] ------------------------------------------------------
11 Jul 17:21:06 - [warn] Missing node modules:
11 Jul 17:21:06 - [warn] - node-red-contrib-mqtt-env (1.0.0): mqtt-env in, mqtt-env out, mqtt-env-broker
11 Jul 17:21:06 - [warn] - node-red-contrib-mqttssl (0.0.5): mqttssl in, mqttssl out, mqttssl-broker
11 Jul 17:21:06 - [info] Removing modules from config
11 Jul 17:21:07 - [info] Settings file : /home/pi/.node-red/settings.js
11 Jul 17:21:07 - [info] Context store : 'default' [module=memory]
11 Jul 17:21:07 - [info] User directory : /home/pi/.node-red
11 Jul 17:21:07 - [warn] Projects disabled : editorTheme.projects.enabled=false
11 Jul 17:21:07 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
11 Jul 17:21:07 - [info] Server now running at http://127.0.0.1:1880/
11 Jul 17:21:07 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
11 Jul 17:21:07 - [info] *****************************************************************
11 Jul 17:21:07 - [info] Flows stopped in safe mode. Deploy to start.
11 Jul 17:21:07 - [info] *****************************************************************
About mqtt-env and mqtt ssl:
Yes, that is good / normal.
Now you need to find all mqttssl nodes and delete them, then deploy AFTER they are all gone.
Additional:
Are you using node-red-contrib-usb
? If not, please uninstall that also.
With mqttssl the situation is the same like mqtt-env.
About node-red-contrib-usb
- i wish to connect xbee modules via usb, so i assume that i need it?
No, you would typically use a separate application called zigbee2mqtt (installed to PI, not node-red) - then you communicate to the zigbee devices via MQTT or node-red-contrib-zigbee2mqtt (node) - Node-RED - so no, you dont need the USB node.
Can you share your flows
This is interesting, but how is better/easier to physically connect xbee to rpi- via usb or jumper wires?
Can't send the full clipboard, because it is too big. I can send pics of the flows, if you want?
@Steve-Mcl : xbee !== zigbee
1 Like
ah, my bad.
then I can help no further I'm afraid.
I would suggest you clean up your flows, get node-red running smoothly then try installing the nodes you need one at a time & checking node-red still works. Post errors as and when they happen.
If you mean, that xbee !== (inequality) zigbee. In my case they are equal (xbee module contains zigbee protocol).