Old code deploys after reboot

Recently when my Pi restarts, the node red code that it loads is not the latest. I can make changes and deploy (both full and modified nodes) and the changes work and remain. If the pi restarts, these changes are no longer present. It keeps reverting to the same previous state.

Any ideas how to stop this?

EDIT: Also, it is only after the pi totally restarts. If I simply restart node red it keeps my latest changes.

  • What version of NR and node.js? (see startup log)
  • what model pi?
  • what os are you running on the pi?
  • how much free space on the SD card? (from terminal df -h
  • in terminal issue cd $HOME/.node-red then a ls -al and copy the results
  • in a reply:
    -- on a new line type three back-tics
    -- enter a new line and paste what you copied
    -- on a new line enter three mre back-tics

Looks like your pis SD card is broken.
The SD card will go in protection mode and can't be written anymore.

+1 for it being the card. I have had that a couple of times, it appears to work perfectly fine, you can write to files and then read the file back and all is well, until you power cycle at which point it goes back to square one. I think the RAM cache on the card still works but it can't write to the permanent store.

That makes sense. Should I be able to easily test this? If I created a random file, then rebooted, if it was the SD card the file would be gone?

EDIT: Tried this, and file did not persist after reboot. Must be the SD card. Which also adds up because I recently starting using influxdb so I mustve stressed it.

Make a copy with win32 disk image and you are up and running in a hour again.

For the future, buy cards that are much bigger then you need. The os has than more room to spread the wearing.
And buy high endurance sd cards, they last much longer.

Great advice, this SD card was from years ago. Looking into running influx on my PC with an SSD and just sending data to it from the pi so theres no writing at all on the pi's end. When I setup influx a few months ago I was worried about corruption, but the fact that I could deploy still threw me off. Didnt think about the RAM.

Thank you!

1 Like

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