Installation corruption

Been using node-red for a year without issues. In the last week have had 2 incidents where the installation had become corrupted (seemingly after trying to run some new node configuration) - application and dashboard loading slowly/freezing, some functionality broken, etc. Trying to reboot node-red (as well AWS entire server) doesn't solve it, seeing these error messages. At one point application launched as if fresh from a new install (no nodes installed, etc). After first time ended up going back to a server back up, after a week happened again. ANY IDEAS??

13 Nov 17:40:01 - [warn] Encrypted credentials not found
13 Nov 17:40:01 - [error] Uncaught Exception:
13 Nov 17:40:01 - [error] Error: listen EADDRINUSE: address already in use 0.0.0.0:1880

That means that something is using the port. Almost certainly node red is already running.

I understand. I was getting those trying "node-red restart" - note sure why a restart is not working as expected, but that doesn't explain the problem; I server reboot always works right. These two incidents feel like installation corruption with really odd behavior almost suggesting virus/hacking issues (but that's highly improbable in my AWS environment).

node-red restart is telling node-red to start and use a flow file named restart

Did you mean node-red-restart?

Yes, as expected since you are essentially stop/starting the operating system. Restarting an application is completely different to restarting the whole computer/container/OS

Or node-red-reload which restarts and shows the startup log.

The next time it goes wrong check top to see if something is hogging the processor.

It's been a while since I originally installed it (Ubuntu) and forgot what I used for start/restart; I guessed that it was "node-red restart" --- I understand that it means something else, however I am getting unrecognized command for "node-red-restart" (just like node-red-reload).

Still, the reboot of the server should cleared out the issues --- it did not, in both cases there seemed to be permanent config corruption. This has never happened before, now twice in one week.

Is this on a Pi by any chance?

No - Amazon AWS

With a cloud server, first thing I'd check would be whether the config is what you expect - e.g. that someone/thing else hasn't made changes. Given some recent experiences from folk on the forum, they found some unwanted guests had come through.

If not sure, I'd change passwords then use my backups to go back to a known-good version, update all software and nodes, reboot the server and then start to make the required changes again. Along the way, I'd also double-check the VM settings to ensure that the server wasn't open, this is sadly a common occurrence on Amazon it seems.

But then my background is partially security so it is my first thought, of course, it might be something much simpler and more obvious.

I think a security flaw is highly unlikely. I believe both times this took place after trying to run some function code that that hanged the system.

It is unusual but not impossible. Node-RED is generally extremely stable but also incredibly powerful so you can absolutely break things if you aren't careful.

But without knowing and reviewing the details of the code, not really possible to comment specifically.

Did you try just restoring your flows file from the backup? Then reboot the server.

I had to restore my entire server from backup (twice) since the reboots were not fixing node-red corruption. And I do backup flows.

You didn't say whether you tried just restoring the flows file. I meant to a state from before this started happening of course.
How do you know that node-red was corrupted?

As I described, the problem was that the node-red application started to malfunction - taking forever to load, freeze - that was happening with or without any flows.

How did you get to the no-flows situation?

My guess :point_down:


This is almost always a sign of something in your flows - usually a feedback loop hogging the processor.

and as mentioned, you therefore need to check what else might be happening on the device. If you keep restoring from backup and then it goes wrong, look for an unexpected agent or misbehaving application. Was it actually node-red or were other applications also having issues? What is happening to SWAP usage? system Load? etc.

Deleted flow, imported backup that worked previously; cleared everything tried to deploy blank.

There were no other issues and no other applications affected. Just node-red, including throwing 504 blank screen.