Node Red - Stuck in Restart Loop

I have an EPIC running NodeRed, but the restart cycle just keeps repeating. When I’m able to open the editor I get a 502 bad gateway page opening up.
forumpost1gw

Click on that Node-RED Console Log link towards the top: ideally it’ll point you to why the service is stopping.

The last deploy, or some other network / device change, is causing the Node-RED to crash and groov EPIC then detects that and restarts it. Hence the cycle.

As @Jonathan_Fischer pointed out, if you open the log, you should be able to see where the flow gets up to before it crashes and restarts.

If its an offline device/IP address etc, fix that and you will be back up and running.
If its some bad function node code you just put into play, it gets a little more involved to fix.
If you don’t have any backups, then you will need to go into groov Manage and the Project Management menu, download the project and I’d run it on a PC/Laptop Node-RED.
Here you can run the project in safe mode and interact with the editor, remove the bad code, then save (export) all the flows and replace whats on the EPIC and get back to where you were before the crash.


https://nodered.org/docs/getting-started/local

I recently installed NodeRed for desktop on the machine that I am acessing the groov epic through. Maybe there is the cause?

I’d export the project from the EPIC, open it in notepad, find and edit the IP address.
Delete the project in the EPIC via the project page and import the edited one and get back up and running.

Start with that and then re-setup your Node-RED to Node-RED access.

Edit the port, looks like it is trying to open port 502 on the EPIC which it will not allow. Change it to a port above 1023.

2 Likes

Duh. Well spotted! That’s exactly why its throwing the permission issue.
Node-RED does not run as root (sudo) and so it cant open it and hence the crash.
It all makes sense now.

Its not the IP address, its the port number… This post will help @Dmachuk