I have a Pi with Node-RED running a Tellstick Duo as the only hardware. After a few days the data stops coming, and I need to reboot to get it working again. Theoretically it should be enough to kill the process without rebooting, which would be preferable because I also have Hass running my Z-Wave system on the same Pi. I have checked the process status, and it's "R" for running. But still using sudo pkill -f node-red
doesnt do anything at all, ps aux | grep node
still shows Node-RED. Is there a good explanation for what's happening, or at least what I can look for here?
Did you try with node-red-stop?
Or you can use the systemctl i think
Yep, maybe I should have said that. Regular close and systemctl close. That's the first thing I tried when I discovered this. It's completely locked up. Any of those commands will only lock up the bash window, so I have to force close that.
I believe it is because the node red is running the exec node as a child process...
But shouldn't that mean that NR always behaved like that? When it isn't locked up like that I can kill it with pkill without any problems.
How long did you leave it? Systemctl will first attempt to close a service nicely. If it hasn't stopped after a timeout then it should get the sledgehammer out. So try node-red-stop and give it several minutes before assuming it is locked.
Would it not be better to work out why it has locked up in the first place and attempt to fix it? If you start node-red in a terminal and leave it running the what do you see when it locks up?
Aha, then I probably didn't wait long enough. I think I waited around 30 seconds before I gave up. I had no idea it could take longer. Thanks!
And no, I haven't. It takes 3-4 days before it happens. But I'll do that now and see if I can learn something from that.
Also look at /var/log/syslog when it fails and see if there is anything obvious there.
Will do, thanks! I have set it up with a mail warning from the central system (which communicates with the Pi with MQTT) to know when it stops.
So today at 15:02:32 it stopped working (after four days). And there's nothing in the open bash window, exccept for the last command sendt, and the same goes for the syslog. But systemd managd to kill it after about a minute, so I can use that.
Next time run top
and see if anything is hogging the processor or if the RAM/Swap are being utilised.
What is the symptom in the node-red editor or dashboard?
Thanks, but I'll just leave it there. The systemctl stop works perfectly when I have a two minute pause after the Phython script sends it (initiated by MQTT on a sentral server) and then send a node-red-start from the same script. It's probably some freak thing since it only happens on this one Pi.
I suspect the problem will bite you at some point if you don't get to the bottom of what is going on. It is almost certainly fixable.
I doubt that it will. It's been like this since I first installed Buster last summer. It's been so unimportant that I didn't make any attempts to fix it until now. The instance is only running a Tellstick Duo which 99 % of the time (probably even less) doesn't pick up any sensors the other four Pi's in the house does not see. The 1 % is the outdoors temp sensor, which I have seen a couple of times being picked up by that one alone.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.