I recently updated 2 mac minis to Sequoia and after doing so, none of my http request nodes would work. They all had EHOSTUNREACH errors. After updating node and node-RED to the latest versions, one of the 2 minis still has no issue. The other (which uses those nodes less frequently) appeared to be fixed at first, but I just opened it up today and it's not working again.
I found this post in the FAQ:
I tried it, but the last open /Applications/Node-RED.app command briefly popped up a generic icon in the dock, but it quickly closed and there was no pop-up to allow it. I checked the Privacy & Security settings and there was no blocked app there to allow.
I tried sudo spctl --master-disable and selecting to allow from Anywhere, tried opening the "app" again, but the same thing happened.
Does anyone know if there are other necessary (perhaps edge-case) steps to get this to work?
Alright. I seem to have solved my problem without use of that procedure in the FAQ that I linked to (which creates that "app"). I had seen advice elsewhere that one solution for the network access issue is to simply re-install node. Even though I was at the latest version (v24.9.0), I did the following and after restarting node-red, I am again able to send to other devices on my network using the http request nodes. Here's my bash history:
I will note that there's a macrumors thread that recommends deleting this file (/Volumes/Macintosh HD/Library/Preferences/com.apple.networkextension.plist) in recovery mode to reset the local network access settings, but I did not try that. Nor has node, node-red, or Node.js ever shown up in the Local Network settings to "enable it".
I had performed the same node update procedure a week or so ago to resolve this same issue on 2 mac minis. One is still functioning correctly, but this other has had the EHOSTUNREACH recur, which I noticed today.
I'm not sure why it popped up again, but after the node re-install, I checked out pm2 and discovered a problem in it's "describe":
Divergent env variables from local env
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TERM_SESSION_ID โ REDACTED โ
โ SSH_AUTH_SOCK โ /private/tmp/REDACTED/Listeners โ
โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
I don't know if that's what caused the problem to recur on this one mac mini or whether the error coming up again is due to some lesser usage pattern on this computer that perhaps made macos come down on it? No clue.
You know, I've been advised before to switch from using pm2 as my manager. pm2 was a part of the procedure I followed when I first started installing/using node-RED. When I did a node-red upgrade a few months ago on one of these mac minis, I tried setting up the manager that's described on this site (I think), but I couldn't get it to work. I don't know why, and I don't remember what the issue was, but I just updated pm2 at the time and it was easy.
However, pm2 has been somewhat problematic, because it stops working about 5 minutes after a reboot, so I always have to manually start node-red. I'd be willing to go with whatever is recommended on these macs, but at the moment, I have too much else going on to try and solve the problems I ran into last time. If you know a good setup article, specifically for macos, that uses the process manager you use, I'll bookmark it for when I have the time to migrate from pm2. Thanks!
Clarification: When I manually start node-red, I use pm2 and it's stable from the on after that first crash upon reboot. I.e. It works to restart node-red from then on, when it crashes.
You don't use node-red as a service on any mac? I'm a little surprised, but I guess most people don't automate maybe as much as I do? I use Node-RED for all my home automations, which includes managing my security camera system running on one of these minis, email triggers, a ton of reminder triggers, and I even scripted the messages app to text myself home automation messages. A lot of that uses osascript to say, complete reminders and such. My reminders scripts use sqlite to "hack" the reminders DB. I have automations that trigger based on an fswatch of the DB file, so that me completing a reminder on my phone can trigger automations. It's pretty fuckin' cool if I do say so myself (which is more of a brag than a sales pitch, because I've only posted snippets of my scripts online).
(Oh, but my main automation hub is an rPi, hence the request node usage.)