How to get a whole new clean start with NR?

Seems I have really made a mess of things and it is only getting worse the more I poke the hornet's nest.

In my other thread about SUBFLOWS I found a link to someone who was having a similar problem to me and @xx_Nexus_xx kind of hinted at a complete rebuild.

Shudder.

Folks,
I've used NR now for about 10 years and kind of can't live without it.
It is great for me to sit down and try things in/with.

SOMEHOW a weird path - which does look NR related - has got involved and is holding me to ransom (ok, bad choice of words) to using NR.

My understanding is that it (NR) is kept local and can't escape to other parts of the machine.
Yet I am seeing paths to somewhat concerning parts of my machine/s.
Which is slightly worrying.

I have just spent about 12 man hours editing flows on machines because of original sloppy writing - by me. Yes. I'll admit it.

But as I'm dong it, the machines are falling over and just being.... jerks.

Ok, I'm kind of stuck on Buster with 2 of them. 1 has (alas) gone to Bookworm.
But Bookworm - to work out of the box for me - needs a LOT OF WORK to work on my network with VNC.

I digress.

So I got that one machine running but on X11 and with VNC so I can get to it via GUI if needed.

The other two.... Please. No!

They've been working now for years. Yes, with the occasional update. But they all fitted in the existing echo system.

Now, I'll admit I recently saw some HUGE differences in NR versions, NODE.JS versions and the like.

Maybe I was lucky, and now my luck has ended.

But weird messages of nodes wanting to send messages to unknown places and not identifying themselves...... That is not a nice feeling.
And all these are OUTSIDE the normal reservation where NR lives.
~./node-red if I am not mistaken.

So when I go exploring and find an entire echo system elsewhere....

I'm sure if it was a problem someone would have told me by now.

But for the sake of self...... happiness (?) I'd prefere to start with a clean slate and install NR again and then find out how/WHY these other FLOWS are getting their hooks into my flows.

Someone - please.
What are my options?
At this point in time:

Machine 3:
NR 4.0.9
Node.js 18.20.8
Buster.
I thought it was bookworm.
I was wrong. That is what I am told it is.
Raspi 2 model B rev 1.1

Machine 2:
NR 4.0.9
Node.js 18.20.8
Buster
RasPi 3 model B Rev 1.3

Machine 1:
NR 4.0.9
Node.js 18.20.6
Buster
RasPi 3 model B Rev 1.3

Learn to use the linux command line and don't bother with VNC.

To get rid of your current flows, installed nodes, settings etc., rename the .node-red red folder and restart node-red. It will recreate the folder for you.

If you also want to re-install node-red then

sudo npm remove -g node-red
sudo apt remove nodejs

make sure the system is up to date

sudo apt update
sudo apt full-upgrade

Then run the node-red install script.

As much as I would like to agree, SOME things are just so much easier via the VNC.
And it is just so much easier doing it that way.

So maybe I am lazy, but it is what it is.

What is really needed is for me to learn what these rogue messages are.
(Sorry, off topic)

Mostly it isn't easier, it is just that you know that way of doing it.
Can you give come examples where the gui is much easier? Preferably ones that you do regularly.

Colin

I make backups - now and then.

(Believe it or not) :wink:

Ok, that one isn't THAT difficult to RESTORE from previous dates.
Sorry.

Ok, today:
I was chasing these rogue directories with a whole Node-Red echo system and errors are coming from that part of the world.
Or to be the best of my understanding, as their paths are shown in the messages.

Moving them from where they are/were to my Public directory so I could then upload some of them for help from this group was just so easy with the GUI.

Really sticking my neck out I deleted them (via GUI) to see what would happen.
NR just wouldn't work.

So, Because I deleted them via the GUI and the were in the TRASHCAN I could get them back.

If I had sudo rm *.js in the directory..... It wouldn't be that easy.

I think that is an example.

There are these difficult things I do now and then and having the GUI makes it just that much easier.

But all this is kinda academic if a "reinstall" of NR would still have these off reservation files that give me the errors I am getting.

Node-RED is installed in /usr/lib/node_modules/node-red directory so messages starting with that are just from the core of Node-RED. Your flows and added nodes are in your.node-red directory so messages starting like that are from things you have added.

1 Like

Thanks.

That IS some serious weight off my shoulders.

Could you please look at my other thread - on problems migrating subflows between machines?

Sorry on my phone so hard to read all those threads. Initial thoughts you mentioned moving from v4 to v3. While I would expect that to work there may have been some subtle change in subflow definitions that may make that not work. I’d be surprised if that was it but :person_shrugging:

Just use RealVNC

1 Like

I'll keep it in mind.

Thanks.

BTW, got the other problem resolved.
(Hurray)

Bit late to this conversation. So 2 issues to deal with:

GUI file handling

Yup, this is absolutely the one thing that is much easier with a GUI. But you have lots of choices, all easier (I think) than a remote desktop (which causes many other issues).

  • Midnight Commander - a command-line GUI file handler
  • A SSH/SCP/SFTP/FTPS client on your normal desktop. Many of these have built-in GUI file handlers and work over SSH connections remotely.
  • VS Code with Microsoft's remote extensions. Also work fine over SSH and provide both command line and (slightly limited) remote file/folder management.

In addition, you can use Linux command line tools such as SCREEN which allows multiple terminals and allows terminals to be disconnected and continue to run in the background. Generally though, I find a desktop tool like WinSCP or one of the newer alternatives easier to work with.

Clean instances of Node-RED

You've already been shown how to create a new, clean, standard install. But I wanted to remind you that, because Node-RED is "just" a Node.js app, its "standard" install is not the only way and indeed, not really the "node.js way".

You can install Node-RED's package to a local folder and tell it to use a sub-folder for the userDir. This is how I always run Node-RED. It means that I'm in full control and full backups/restores are trivial. It also means that I can have multiple instances of Node-RED - even running on different versions! Great for testing out new releases or for those cases you've mentioned where you want to migrate from an old, crusty instance that has got rather messy to a new instance but want less downtime.

My alternate installer repo shows you everything you need to set up local versions and even has templates available for systemd scripts, backup scripts, etc.

1 Like

Thanks Julian.

This was a last ditch if things were THAT BAD.

Luckily they aren't and I've been through a few days of subflow headaches.

Yeah, not the normal way most people do things.

After these days of headaches the problem has been resolved.
All 3 machines are running the same version. 4.0.9 and node.js is the same on all.
All on the same O/S. One on an earlier machine than the other two.

I really hope that gives me a lot of time until it becomes needed to update again.

I maybe should now close this thread.

But thanks all for the help.
I was just getting worried because of the other problem (and others) that were also happening.

Since I have resolved the problem making me want/need a clean install I think I may call it a day with this thread.

Glad you got it sorted. One final piece of advice to take or leave as you wish.

Don't leave updates to accumulate. Update regularly, update problems are fairly rare and generally easier to deal with single version updates than long-term backlogs.

1 Like

No, (or yes)... :wink:

I do understand what you mean, and I probably am guilty of not doing it enough.

And - maybe - that contributed to the problem.
It would/was a weird mishmash of things.

And thanks for kind of stressing to me that fact.

Sometimes I get bogged in the wrong thing/s which I shouldn't.
(guilty of that recently with an innocent machine being brought down and me fixating on it rather than the REAL problem.)
I lost a few days of work tidying up subflows.
Sorry, I now rattling on ......