question

nickdb avatar image
nickdb asked

Node red missing nodes after reboot

After rebooting my GX some modules were missing by marked as installed. Trying to remove them fails as does doing it manually via npm. No luck forcing a reinstall either.

Is there a way to reinstall/reset node red in the large image? I am running the current beta venus OS.

@Dirk-Jan Faber any suggestions?

thanks.

Node-RED
3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

johnny-brusevold avatar image johnny-brusevold commented ·

@nickdb

check if they are installed with the -g global command

https://nodered.org/docs/user-guide/node-red-admin

0 Likes 0 ·
nickdb avatar image nickdb ♦♦ johnny-brusevold commented ·
@Johnny Brusevold That appears to be the case.

So with npm remove/install -g I could remove and install it again but the ui still does not show it as installed and is still marked as missing.

Thanks for the help.

0 Likes 0 ·
nickdb avatar image nickdb ♦♦ johnny-brusevold commented ·
looking at logs I am getting a lot of out of space errors on /data/home so I think I am going to have to try clean up whatever is consuming it.
0 Likes 0 ·
1 Answer
nickdb avatar image
nickdb answered ·

Ok, that was a bit of an effort.

The /data partition was filling up and it appears when node red was trying to do something, it would stage packages and run out of space.

So I exported my flows.

Then booted the previous firmware image, disabled node red and via ssh, scrubbed the /data/home/nodered/.node-red/ folder.

I then upgraded to the current firmware and had a vanilla node red again.

I could reinstall my modules then import the flows again.

The volume is using less capacity now.

Ultimately the venus has less than half the space than the cerbo, and having loaded a node that was deceptively large (socketcan), it pushed it over the edge.

4 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

That indeed is the correct way to go to the factory defaults.
Note that you can add extra disk space via an external USB disk / stick.

0 Likes 0 ·
nickdb avatar image nickdb ♦♦ Dirk-Jan Faber (Victron Energy) ♦♦ commented ·
@Dirk-Jan Faber Excellent. Thanks. Is there a documented process for doing this expansion by usb?
0 Likes 0 ·
Dirk-Jan Faber (Victron Energy) avatar image Dirk-Jan Faber (Victron Energy) ♦♦ nickdb ♦♦ commented ·

AFAIK there is no documentation or support on this. Main reason is that there is no user friendly generic way on doing it and USB disks are not too reliable media either. There are some different options on getting this to work, each with its own benefits and downsides. And some risks (worst case scenario is probably erasing the wrong disk).

Easiest way of getting extra space probably is to just remove the files from `/data/home/nodered/.npm/`, which mainly consists of cache files.

But assume that you will want to have all of the node-red files on the external disk. The way I would do it is to setup an ext4 filesystem on the USB disk first. That has the downside of no longer being able to use the disk from windows. If doing this from a cerbo:

  • plug in the disk into the usb port of the Cerbo. Assuming it shows up as `/dev/sda`.
  • stop the service vrmlogger: `cd /service; svc -d vrmlogger`
  • stop the node-red service: `svc -d node-red-venus`
  • unmount the disk: `umount /dev/sda`
  • create a filesystem on it: `mkfs.ext4 -L space /dev/sda`
  • unplug and replug the disk
  • move the existing `/data/nodered/.node-red` and `/data/nodered/.npm` directories to `/run/media/sda`: `mv /data/home/nodered/.node-red /run/media/sda/` and `mv /data/home/nodered/.npm /run/media/sda/`
  • symlink both directories from `/data/home/nodered` to the external disk:
    `ln -s /run/media/sda/.node-red /data/home/nodered/` and `ln -s /run/media/sda/.npm /data/home/nodered/`
  • reboot the system

As said, a typical usb stick is not meant for lots of writes either. So my first choice would be to clear the cache first and check what else is taking up the space. If the extra space then still is needed, I'd opt for an external ssd (connected via a powered usb hub).
The above instructions are to be used at your own risk. If you don't know what the commands do it probably is best not to do this.

0 Likes 0 ·
nickdb avatar image nickdb ♦♦ Dirk-Jan Faber (Victron Energy) ♦♦ commented ·

Thanks, appreciated. I suspect I will be investing in a Cerbo soon, then venus cpu is taking strain.

edit: Clearing the cache gave tons of space back. Thanks again.

0 Likes 0 ·