Cannot install Node-Red node

I found problem that Node-Red add-on couldn’t update or install new node. It runs for a while and then stops. And nothing is installed. Tried rebooting add-on and hassio. Tried also rebuilding and reinstalling Node-Red.

DNS name resolution seems to work fine. I can ping all sites without problem. System time is correct.

Error I get is:
12 Feb 22:25:41 - [info] Installing module: node-red-contrib-home-assistant, version: 0.2.1
12 Feb 22:27:41 - [info] Installing module: node-red-contrib-home-assistant, version: 0.2.1
12 Feb 22:27:54 - [warn] Installation of module node-red-contrib-home-assistant failed:
12 Feb 22:27:54 - [warn] ------------------------------------------
12 Feb 22:27:54 - [warn] npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info attempt registry request try #1 at 10:25:44 PM
npm http request GET https://registry.npmjs.org/node-red-contrib-home-assistant
npm info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND registry. npmjs. org registry. npmjs. org:443
npm info attempt registry request try #2 at 10:26:14 PM
npm http request GET htt ps://registry.npmjs. org/node-red-contrib-home-assistant
npm info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND registry.npmjs. org registry. npmjs. org:443
npm info attempt registry request try #3 at 10:27:34 PM
npm http request GET htt ps://registry. npmjs. org/node-red-contrib-home-assistant
npm ERR! Linux 4.4.50
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “–save” “–save-prefix=~” “–production” “[email protected]
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! network getaddrinfo ENOTFOUND registry .npmjs. org registry. npmjs. org:443
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’
npm ERR! Please include the following file with any support request:
npm ERR! /share/node-red/npm-debug.log

Sorry for added spaces in addresses, forum rules of new person allow only two links.

Updated to lastest hassio but it didn’t resolve this. What could be wrong? What info I can provide to investigate this further?

@NotoriousBDG could you help on this one?

It looks like a DNS issue to me too. Are you using the Pi-Hole addon? If so, make sure you use a static IP on your hassio box.

Thanks for reply. I have tried setting hassio (or exactly resin.io) DNS to Pi-Hole and also to Google dns 8.8.8.8. And no change in error message.

Any way to verify that inside Node-Red?

Enable SSH access to the ResinOS host OS using Debugging the Home Assistant Supervisor | Home Assistant Developer Docs. SSH to the host and execute
docker exec -it addon_27e642c6_nodered /bin/bash. That will drop you into a bash shell inside the Node-RED container.

Thanks for guide. I really needed it and now I have learn more.
Ok, you were right. It’s DNS issue. But for some reason Hass.io didn’tchange DNS server even if I change server ip to SD card setup file.

I had to go thru lots of steps to learn get it to change ip config. With command nmcli connection show it gave me multiple connections and active connection didn’t have latest settings (it had pi-hole ip which is same as hassio ip). I then deleted rest and gave it nmcli connection up resin-newconnectionname. And still had to go thru many trial and error steps.

I had DNS server setup to Pi-Hole. Now it’s google dns and I could install node-red-contrib-home-assistant. But I cannot get it to connect to Hassio. I have Hassio setup up with SSL connection with Let’s encrypt and DuckDNS. I have tried with ip and with dns name, like https://192.168.1.100:8123 and https://myserver.duckdns.org:8123 but it doesn’t connect. Just error "Connection error occured with the home-assistant server: {"type":"error"}". I know that my router doesn’t support loopback.

Do I have to do hosts file modification inside Node-Red container? I have read that many other users have this same problem. Maybe you could find a fix for it?

You can use http://hassio/homeassistant, which makes Node-RED use the hassio API proxy to bypass the need for split DNS or NAT loopback.

Thanks for your support! That single address solved almost all of of my Node-red problems. I have seen that somewhere in developer material but didn’t occur to me that it can be used like this.
I made suggestions to add that your addon documentation and also to Node-RED Home Assistant documentation.

Now that we are talking, do you have idea why node-red-node-msgpack and node-red-node-rbe notifies that they have updates but atleast I cannot update them?

Failed to update: node-red-node-rbe
Module not locally installed
Check the log for more information
1 Like

Glad to hear it’s working for you.

You can update those by rebuilding the addon. Just navigate to http://hassio.local:8123/hassio/addon/27e642c6_nodered then click on “Rebuild”. Once it’s complete, all of the builtin nodes should be updated.

I had previously done rebuild, but at that time Node-Red had limited connectivity. Now rebuild fixed also this.
Thanks again for your help!

1 Like

hi i managed to install node red, but i cant configure the server, i get this error can someone help me

You aren’t giving us much info. Are you running Hass.io? Try enter http://hassio/homeassistant to Node-Red as hass.io server address. That fixed it for me.

1 Like

I’m having the same problem as fernandex00. I have HASSIO and installed NodeRed from the repository. Added the home assistant nodes and they show up fine, but I can’t configure any of the nodes with my server info (http://my-ip:8123 + my api pw, I also tried http, https, fqdn for kicks, same result). When I remove the nodes and delete the server, the error continues to be logged over and over (debug window as well as the hassio log).

“Home assistant connection failed with error: Connection to home assistant could not be established with config: http://my-ip:8123

Have you tried that “magic” address that I suggested to fernandex00? Type exactly http://hassio/homeassistant as server address.

hello, no its not working either, i dont manage to solve it yet, dont know what to do

Drogfild, that address worked for me. Thank you! Should we make a recommendation to update the wiki/docs pages?

One small note: I had to stop/start NodeRed via the HASSIO page in order to get rid of the repeated connection errors…even though I had purged my flows and the config of all home assistant entries, something was stuck in memory and the connection error was constantly logging. A quick stop/start resolved that for me.

Arghh, im starting to get this error now too "Home assistant connection failed with error: Connection to home assistant could not be established with config: "

After working for half a year, this has all gone a bit pear shaped. Any help would be greatly appreciated. Using hass.io and node-red package from here: https://github.com/korylprince/hassio-node-red/tree/master/node-red

Hi all, sorry to hear that it didn’t work out for everyone. That’s good advice from forrestjr that you should restart Node-Red add-on after modifying settings. Just to make sure it’s effecting.

I use node-red add-on from https://github.com/notoriousbdg/hassio-addons/blob/master/node-red/README.md
A while back I made contribution to it’s readme section 11 and it links to https://flows.nodered.org/node/node-red-contrib-home-assistant and also guides to use that proxy address.

Are you using different components in your setups? You should also try rebuilding Node-Red add-on from Hass.io page.

Strangely - it just started working. I left it alone for a few hours, came back and errors stopped.

What the !? :slight_smile: