Reboot the Pi, now Node Red won't start - Where to look


#1

I was trying to troubleshoot an Alexa connection problem, and I would normally reboot the Raspberry Pi, and 5 minutes later Home Assistant would be online. Everything seems to be working except that Node Red refuses to start. I didn’t make any changes, this just happened after a reboot.

Does anyone have a tip on where I should be looking for the problem?
What would you do next?

I don’t think I’ve done much in Node Red, so a restore to the last snapshot is a possibility.

UPDATE- I tried a clone of my Micro SD card from three weeks ago, and no difference. Everything in Home Assistant works, except for Node Red.

Steve
Home Assistant 0.83.1


#2

Can you access your node red machine on port 1880 using a web browser?

Do you have node red installed as a service under Raspbian?


#3

Sounds like you are runninf Node-Red as HA-Addon. There are 2 options I can think of

  1. Create a snapshot of your current system and restore back a previous one… than test it
  2. There was an issue with BigTimer node which prevented node-red to start… have a look in this thread

#4

Thanks for the reply. Not seeing Node Red on port 1880 was my first clue. I did get to the login screen a couple of times, but no further.


#5

Yes, it is an HA Addon. I am not running Raspian on the Home Assistant Pi.
I thought of doing the snapshot restore to a snapshot of last week. How would that be different from changing the Micro SD card for a clone from three weeks ago?

I also read somewhere that removing Node Red and deleting the ~/config/node-red folder completely then reinstalling Node-Red through the Add-on store worked. But that would make all my flows go away. (Are all my flows in flows.json?).

Looking at the error log (on the info page) I did see an error associated with BigTimer. Thanks for the link (Big Timer won’t allow node red to start), I’ve got some reading to do. Come to think of it, I did do an upgrade to Node Red 1.3.0 recently (that will teach me to not do upgrades).

I can’t install NPM on the HassOS image, so ‘npm audit’ won’t run either.

Again, thanks for pointing me to that link.

Steve


#6

I had bad experience with cloned SD card.

Using a previous snapshot is usually the faster route and works well.

I have removed my HA-Node-Red addon and installed the Node-Red on a dedicated RPi which resulted in a better response time and much less hassle :slight_smile:


#7

Actually, I rotate through them. Every two or three weeks I clone my current SD card, then boot from the clone. I have three cards so I clone 1 -> 2, then boot from #2. Two weeks later, I clone 2 ->3 and boot from #3, finally two weeks later I clone 3 -> 1 and boot from #1. This way if I have a bad clone, I’ll know right away and can fallback to where I was just a few hours later.

The link that you forwarded to me seems to describe my problem exactly. The error log even looked like mine with a BigTimer error. So, I am making a snapshot now and will then upgrade Node Red add-on to Version 1.3.2.

A FEW MINUTES LATER…
That fixed the problem.
Thanks a whole bunch.

And a few minutes more.
OK, I did have to do a couple of additional steps. The problem was first apparent when I discovered that any Alexa command (using the Alexa Home node) was met with “…is not responding”.
So, after the update I noticed that some of my nodes had an error “EADDRINUSE”. That was easily fixed by forcing a re-deploy. Alexa still wasn’t working then I remembered that I had tried a discovery from the Alexa app before I realized that my Node Red wasn’t working, so Alexa had marked those nodes as “offline”. A simple “discover” fixed that, too.