I am creating a product which uses the Hologram Nova USB cellular modem plugged into a beaglebone black to send mqtt messages. I am having trouble getting node red to fire up on boot. I have created the recommended service to start up node red. Unfortunately, it is looking for a connection to the 1800 port before it will begin. Anyone have any ideas how to get around this and to begin the connection?
Add a require network setting to the systemd startup script
Actually I think he wants the opposite... that is in fact there by default on bbb... and needs to be stopped.
so maybe you can just remove / rename it ( /lib/systemd/system.node-red.socket
)
you may also want to add Restart=on-failure
to the [Service] section of node-red.service
then try sudo systemctl enable nodered.service
to enable it.
(Not tried this so relying on your feedback
Guys thank you for your suggestions. I wanted to add some more info in order to help get to the bottom of this. I took a snippet of journalctl. It shows that my cellular network is assigned an ip and is up and running as ppp0, however, node-red is looking for 172.0.0.1:1880. @dceejay: I do have "restart=on-failure" and nodered-service enabled. Again I really am very grateful for your collaboration!
Sep 24 17:21:25 beaglebone pppd[1070]: local IP address 10.170.249.70
Sep 24 17:21:25 beaglebone pppd[1070]: remote IP address 10.170.249.70
Sep 24 17:21:25 beaglebone pppd[1070]: primary DNS address 212.9.0.135
Sep 24 17:21:25 beaglebone pppd[1070]: secondary DNS address 212.9.0.136
Sep 24 17:21:26 beaglebone dnsmasq[1003]: no servers found in /etc/resolv.conf, will retry
Sep 24 17:21:26 beaglebone dnsmasq[1003]: reading /etc/resolv.conf
Sep 24 17:21:26 beaglebone dnsmasq[1003]: using nameserver 212.9.0.135#53
Sep 24 17:21:26 beaglebone dnsmasq[1003]: using nameserver 212.9.0.136#53
Sep 24 17:21:29 beaglebone startModem.sh[680]: PPP session started
Sep 24 17:21:29 beaglebone systemd[1]: Started Start the Hologram Modem on Startup.
Sep 24 17:21:30 beaglebone bonescript-autorun[715]: info: Starting bonescript autorun service
Sep 24 17:21:35 beaglebone Node-RED[770]: 24 Sep 17:21:35 - [info]
Sep 24 17:21:35 beaglebone Node-RED[770]: Welcome to Node-RED
Sep 24 17:21:35 beaglebone Node-RED[770]: ===================
Sep 24 17:21:35 beaglebone Node-RED[770]: 24 Sep 17:21:35 - [info] Node-RED version: v0.18.7
Sep 24 17:21:35 beaglebone Node-RED[770]: 24 Sep 17:21:35 - [info] Node.js version: v6.14.3
Sep 24 17:21:35 beaglebone Node-RED[770]: 24 Sep 17:21:35 - [info] Linux 4.14.49-ti-r54 arm LE
Sep 24 17:21:42 beaglebone kernel: pruss 4a300000.pruss: creating PRU cores and other child platform devices
Sep 24 17:21:42 beaglebone kernel: remoteproc remoteproc1: 4a334000.pru is available
Sep 24 17:21:42 beaglebone kernel: pru-rproc 4a334000.pru: PRU rproc node /ocp/pruss_soc_bus@4a326004/pruss@0/pru@34000 probed successfully
Sep 24 17:21:42 beaglebone kernel: remoteproc remoteproc2: 4a338000.pru is available
Sep 24 17:21:42 beaglebone kernel: pru-rproc 4a338000.pru: PRU rproc node /ocp/pruss_soc_bus@4a326004/pruss@0/pru@38000 probed successfully
Sep 24 17:21:43 beaglebone systemd[1]: Reached target Sound Card.
Sep 24 17:21:43 beaglebone Node-RED[770]: 24 Sep 17:21:43 - [info] Loading palette nodes
Sep 24 17:21:43 beaglebone systemd[1]: Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
Sep 24 17:21:44 beaglebone systemd[1]: Found device /dev/ttyGS0.
Sep 24 17:21:44 beaglebone systemd[1]: Started Serial Getty on ttyGS0.
Sep 24 17:21:45 beaglebone systemd[1]: Started Generic Board Startup.
Sep 24 17:21:45 beaglebone systemd[1]: Started Enable gps pins.
Sep 24 17:21:45 beaglebone systemd[1]: Starting BB WL18xx Bluetooth Service...
Sep 24 17:21:45 beaglebone systemd[1]: Started BB WL18xx Bluetooth Service.
Sep 24 17:21:45 beaglebone systemd[1]: Reached target Multi-User System.
Sep 24 17:21:45 beaglebone systemd[1]: Reached target Graphical Interface.
Sep 24 17:21:45 beaglebone systemd[1]: Starting Update UTMP about System Runlevel Changes...
Sep 24 17:21:45 beaglebone systemd[1]: Started Update UTMP about System Runlevel Changes.
Sep 24 17:21:45 beaglebone systemd-logind[717]: Watching system buttons on /dev/input/event0 (tps65217_pwr_but)
Sep 24 17:21:45 beaglebone systemd[1]: Startup finished in 13.755s (kernel) + 58.072s (userspace) = 1min 11.828s.
Sep 24 17:21:53 beaglebone systemd-timesyncd[648]: Synchronized to time server 46.19.96.19:123
Sep 24 17:21:53 beaglebone systemd[1]: Time has been changed
Sep 24 17:21:53 beaglebone systemd[1]: apt-daily-upgrade.timer: Adding 28min 4.602759s random time.
Sep 24 17:21:53 beaglebone systemd[1]: apt-daily.timer: Adding 22min 22.424590s random time.
Sep 24 17:22:01 beaglebone Node-RED[770]: 24 Sep 17:22:01 - [info] Dashboard version 2.9.4 started at /ui
Sep 24 17:22:01 beaglebone Node-RED[770]: 24 Sep 17:22:01 - [warn] ------------------------------------------------------
Sep 24 17:22:01 beaglebone Node-RED[770]: 24 Sep 17:22:01 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
Sep 24 17:22:01 beaglebone Node-RED[770]: 24 Sep 17:22:01 - [warn] ------------------------------------------------------
Sep 24 17:22:01 beaglebone Node-RED[770]: 24 Sep 17:22:01 - [info] Settings file : /root/.node-red/settings.js
Sep 24 17:22:01 beaglebone Node-RED[770]: 24 Sep 17:22:01 - [info] User directory : /root/.node-red
Sep 24 17:22:01 beaglebone Node-RED[770]: 24 Sep 17:22:01 - [warn] Projects disabled : editorTheme.projects.enabled=false
Sep 24 17:22:01 beaglebone Node-RED[770]: 24 Sep 17:22:01 - [info] Flows file : /root/.node-red/flows_beaglebone.json
Sep 24 17:22:02 beaglebone Node-RED[770]: 24 Sep 17:22:02 - [error] Unable to listen on http://127.0.0.1:1880/
Sep 24 17:22:02 beaglebone Node-RED[770]: 24 Sep 17:22:02 - [error] Error: port in use
Sep 24 17:22:02 beaglebone systemd[1]: nodered.service: Main process exited, code=exited, status=1/FAILURE
Sep 24 17:22:02 beaglebone systemd[1]: nodered.service: Unit entered failed state.
Sep 24 17:22:02 beaglebone systemd[1]: nodered.service: Failed with result 'exit-code'.
Sep 24 17:22:02 beaglebone systemd[1]: nodered.service: Service hold-off time over, scheduling restart.
Sep 24 17:22:02 beaglebone systemd[1]: Stopped Node-RED graphical event wiring tool..
Sep 24 17:22:02 beaglebone systemd[1]: Started Node-RED graphical event wiring tool..
Sep 24 17:22:10 beaglebone Node-RED[1516]: 24 Sep 17:22:10 - [info]
Sep 24 17:22:10 beaglebone Node-RED[1516]: Welcome to Node-RED
Sep 24 17:22:10 beaglebone Node-RED[1516]: ===================
Sep 24 17:22:10 beaglebone Node-RED[1516]: 24 Sep 17:22:10 - [info] Node-RED version: v0.18.7
Sep 24 17:22:10 beaglebone Node-RED[1516]: 24 Sep 17:22:10 - [info] Node.js version: v6.14.3
Sep 24 17:22:10 beaglebone Node-RED[1516]: 24 Sep 17:22:10 - [info] Linux 4.14.49-ti-r54 arm LE
Sep 24 17:22:14 beaglebone Node-RED[1516]: 24 Sep 17:22:14 - [info] Loading palette nodes
Sep 24 17:22:28 beaglebone systemd[1]: Time has been changed
Sep 24 17:22:28 beaglebone systemd[1]: apt-daily-upgrade.timer: Adding 57min 19.048061s random time.
Sep 24 17:22:28 beaglebone systemd[1]: apt-daily.timer: Adding 3h 11min 20.191670s random time.
Sep 24 17:22:29 beaglebone Node-RED[1516]: 24 Sep 17:22:29 - [info] Dashboard version 2.9.4 started at /ui
Sep 24 17:22:30 beaglebone Node-RED[1516]: 24 Sep 17:22:30 - [warn] ------------------------------------------------------
Sep 24 17:22:30 beaglebone Node-RED[1516]: 24 Sep 17:22:30 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
Sep 24 17:22:30 beaglebone Node-RED[1516]: 24 Sep 17:22:30 - [warn] ------------------------------------------------------
Sep 24 17:22:30 beaglebone Node-RED[1516]: 24 Sep 17:22:30 - [info] Settings file : /root/.node-red/settings.js
Sep 24 17:22:30 beaglebone Node-RED[1516]: 24 Sep 17:22:30 - [info] User directory : /root/.node-red
Sep 24 17:22:30 beaglebone Node-RED[1516]: 24 Sep 17:22:30 - [warn] Projects disabled : editorTheme.projects.enabled=false
Sep 24 17:22:30 beaglebone Node-RED[1516]: 24 Sep 17:22:30 - [info] Flows file : /root/.node-red/flows_beaglebone.json
Sep 24 17:22:30 beaglebone Node-RED[1516]: 24 Sep 17:22:30 - [error] Unable to listen on http://127.0.0.1:1880/
Set a static IP for your interface eth0.