GUI Starts then Stops on Startup - Unable to connect

Hi folks,

I have got Node Red running on a Pi Zero.

It was installed using the recommended script and was working fine for a while. Then I started being unable to see the GUI. It was either not connecting at all, or it was hanging at the "Loading Palette" loading bar.

I have SSH'd onto the device, stopped Node Red using node-red-stop then tried node-red-log to see if I could see anything unusual. This is what I get:

9 May 20:34:26 - [info] Settings file  : /home/pi/.node-red/settings.js
9 May 20:34:26 - [info] Context store  : 'default' [module=memory]
9 May 20:34:26 - [info] User directory : /home/pi/.node-red
9 May 20:34:26 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 May 20:34:26 - [info] Flows file     : /home/pi/.node-red/flows_pizerocam.json
9 May 20:34:27 - [info] Server now running at http://127.0.0.1:1880/
9 May 20:34:27 - [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.
---------------------------------------------------------------------
9 May 20:34:27 - [info] Starting flows
9 May 20:34:33 - [info] Started flows
9 May 20:34:34 - [info] [mqtt-broker:Dashboard] Connected to broker: mqtt://192.168.0.16:1883
9 May 20:37:43 - [info] Stopping flows
Stopping Node-RED graphical event wiring tool...
9 May 20:37:43 - [info] [mqtt-broker:Dashboard] Disconnected from broker: mqtt://192.168.0.16:1883
9 May 20:37:43 - [info] Stopped flows
nodered.service: Succeeded.
Stopped Node-RED graphical event wiring tool.

It doesn't seem to show an error, but it just shuts down the GUI as soon as it starts.

Has anyone got any suggestions of why it might be doing this, and what I can do to resolve it?

Thanks muchly!

Additional :

I'm not sure if I don't if the node-red-log command is supposed to do that, but if I stop Node Red, then run node-red-start I get this (the GUI doesn't shut down) but I am still unable to connect to the web page - it just times out. Any thoughts would be gratefully received! :+1:

One more thing which just came to mind - I have a flow which auto starts when Node Red starts up. It makes an announcement on my Google Home Speaker. This is still working! I get the announcement when the Node Red service starts, but I am still unable to access the web GUI. :woozy_face:

Start Node-RED

Once Node-RED has started, point a browser at http://192.168.0.15: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.
9 May 20:52:52 - [info]
Welcome to Node-RED
===================
9 May 20:52:52 - [info] Node-RED version: v1.3.4
9 May 20:52:52 - [info] Node.js  version: v12.22.1
9 May 20:52:52 - [info] Linux 5.10.17+ arm LE
9 May 20:52:56 - [info] Loading palette nodes
9 May 20:53:10 - [info] Settings file  : /home/pi/.node-red/settings.js
9 May 20:53:10 - [info] Context store  : 'default' [module=memory]
9 May 20:53:10 - [info] User directory : /home/pi/.node-red
9 May 20:53:10 - [warn] Projects disabled : editorTheme.projects.enabled=false
9 May 20:53:10 - [info] Flows file     : /home/pi/.node-red/flows_pizerocam.json
9 May 20:53:10 - [info] Server now running at http://127.0.0.1:1880/
9 May 20:53:10 - [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.
---------------------------------------------------------------------
9 May 20:53:10 - [info] Starting flows
9 May 20:53:15 - [info] Started flows
9 May 20:53:16 - [info] [mqtt-broker:Dashboard] Connected to broker: mqtt://192.168.0.16:1883

When you did node-red-stop the first time, it stopped node-red. Then node-red-log showed you it starting up previously and shutting down, which is what is expected.

node-red-start starts node red and then runs node-red-log for you so that see what happens as it starts up and runs. The log looks perfectly normal.

Where are you running the browser? Not on the Pi I hope.

Which browser are you using? Try a different one if possible.

If still no joy, clear the browser cache and then force a page reload. It probably won't make a difference but try it just in case.

ssh into the pi and run top. Try to connect the browser and see if top is showing anything unusual, in terms of memory or CPU usage.

Finally bring up the browser developer console and refresh the page and see if there are any errors shown.

Hopefully something there will give us a clue.

Hi Colin,

Thanks for your reply.

Here are the answers to your questions:

Node Red was working fine, then it stopped connecting and hanging at the Loading Palette screen. There are only 2 flows in the instance. One automatically makes and announcement on the Google Home speaker. The other waits for a motion sensor to activate then takes a photo, converts it to Base64 then sends it to a MQTT feed. There is nothing really taxing I thought. Now, the browser doesn't even connect even though Node Red appears to be running when I am connected through SSH.

I have also got Node Red running on a Pi3 with more complex Nodes, Mosquito and SQLite and it is running fine. They are both running the same version, installed in the same way with the recommended script.

I am running the browser on a Win10 laptop and I have tried Chrome, Edge and Firefox. I have also tried Chrome and Samsung Browser on a tablet. I have tried clearing the browser cache and this made no difference.

I'm not with the Pi today, so I will run you additional suggestions when I'm back tomorrow and let you know the outcome.

Thanks again for your help.

Hi Colin,

I had some very strange results when I looked at the Pi's today. The one which wasn't working had started working fine, and the one which was working fine was showing the problem of stalling at "Loading Palette"!

Thankfully, I finally figured it that it was nothing to do with Node Red and it was a mis-configured router on my network which must have been causing a network issue. I have turned off the router and everything is working fine now.

Sorry for wasting your time, but thanks for the pointers they were really helpful for ruling things out!

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