Home Assistant Community Add-on: Node-RED

Accessing node red via the 1880 port seems to work in chrome incognito mode.
Might be a cache issue when the login pops up all the time?

1 Like

Any advice on how to troubleshoot please. NodeRed has been running fine but when i tried to upgrade yesterday to 3.0 using the Hassio webinterface i get the following error message.

  • 19-04-15 22:16:28 INFO (SyncWorker_17) [hassio.docker.interface] Pull image hassioaddons/node-red-armv7 tag 3.0.0.
  • 19-04-15 22:16:29 ERROR (SyncWorker_17) [hassio.docker.interface] Can’t install hassioaddons/node-red-armv7:3.0.0 -> 500 Server Error: Internal Server Error (“readlink /mnt/data/docker/overlay2/l: invalid argument”).

I tried uninstalling NodeRed in the addons and rebooting, and then trying to install from scratch but same issue.

Running

  • HassOS 2.11
  • Hass.io supervisor 160
  • Home Assistant 0.91.3

Plenty of disk space.

After upgrade to 3.0.0 and setting network port running in to issues accessing Node Red instance via reverse proxy. Monitoring tools like uptimerobot and freshping do not see Node Red as up while it’s running just fine if accessing directly. Also log now shows all web activity which didn’t show before?

I wish I could have a choice to use Ingress or not. This is a major breaking change.

This is an unfortunate docker issue that points to some corruption in the filesystem. It’s been coming up a lot lately but I think the common factor is a pi and SD ? I may be wrong.

The best thing to do is reflash and restore from snapshot, since the fix involves removing everything anyway.

1 Like

Thanks. Reflashed the sd card from the RPI, Grabbed last nights snapshot, Wipe and Restore and it now allows me to upgrade.

For people who opened direct access by enabling and setting the port to 1880 and experiencing repeated login cycles. This might be a solution to resolve it:

It seems like node-red stored a piece of information about the login system used in versions of the node-red add-on before v3.0.0 (e.g., v2.0.2).

This authentication method does not exist anymore but nevertheless, throws off Node-RED so it seems.
Removing this manually helps in all the tests I’ve done tonight.

6 Likes

Hi,

I found the underlying adress. I found it under (in this case Safari) developer/web inspector/network/documents

The adress is in the format:

https://redacted.duckdns.org:8123/api/hassio_ingress/“longstring”

I pasted this as my node red url for panel iframe and it worked as before. No need to enable any ports.

I reached it immediately from my iMac. I initially had problems with my iPad (unauthorized 401). But if I first entered either add-on (I also have configurator) from the web ui link on the I could access it directly from the panel.

I’m seeing some broken images in the nodered UI after upgrading. Other than that ingress seems to be working great

Deleting the cookies for this specific page solved the issue for me … ingress and using the port is working for me now:

image

Local storage is the issue, not cookies. See:

Encountering an issue when trying to use the Ingress method… When I click on the image button, the page blanks for a minute or so and then says:
image

I was able to get port 1880 to work by following the instructions to clear the local storage so I am able to access Node-RED that way but I would like Ingress to work so I can access it it remotely through the new remote UI.

Node-RED is running:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 

-----------------------------------------------------------
 Hass.io Add-on: Node-RED
 Flow-based programming for the Internet of Things
-----------------------------------------------------------
 Add-on version: 3.0.0
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 9 (stretch)  (amd64 / qemux86-64)
 Home Assistant version: 0.91.3
 Supervisor version: 160
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing... 
up to date in 0.781s
found 0 vulnerabilities

[cont-init.d] node-red.sh: exited 0.
[cont-init.d] user.sh: executing... 
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[09:01:57] INFO: Starting Node-RED...

> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"

16 Apr 09:01:59 - [info] 

Welcome to Node-RED
===================

16 Apr 09:01:59 - [info] Node-RED version: v0.20.5
16 Apr 09:01:59 - [info] Node.js  version: v10.14.2
16 Apr 09:01:59 - [info] Linux 4.9.0-8-amd64 x64 LE
16 Apr 09:01:59 - [info] Loading palette nodes
16 Apr 09:02:01 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
16 Apr 09:02:01 - [info] Settings file  : /etc/node-red/config.js
16 Apr 09:02:01 - [info] Context store  : 'default' [module=memory]
16 Apr 09:02:01 - [info] User directory : /config/node-red/
16 Apr 09:02:01 - [warn] Projects disabled : editorTheme.projects.enabled=false
16 Apr 09:02:01 - [info] Flows file     : /config/node-red/flows.json
16 Apr 09:02:01 - [info] Starting flows
16 Apr 09:02:01 - [info] Started flows
16 Apr 09:02:01 - [info] Server now running at http://127.0.0.1:46836/
[09:02:01] INFO: Starting NGinx...
16 Apr 09:02:06 - [info] [server:Home Assistant] WebSocket Connected to http://hassio/homeassistant

:tada: Release v3.0.1

Full Changelog

Changed

  • :ambulance: Increases NGinx wait timeout for slower devices
  • :ambulance: Fixes authentication issues by forcing Node-RED to disable auth
  • :ambulance: Fixes SSL issues by forcing Node-RED to disable SSL
  • :arrow_up: Bumps Home Assistant requirement to 0.91.4

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

Still having this issue after updaying to Node-RED addon 3.0.1 and HA 91.4… Other addons that use Ingress seem to work… InfluxDB for example

but Node-RED always gives me 502 Bad Gateway error.

v3.0.1 seems to be working with ingress just fine against Hassio. However, I’ve lost one sensor that was fed off an “http in” node. I re-enabled the 1880 forwarding on the container, but the service that was forwarding data to node-red is now always getting 401 authentication errors now.

I’ve tried using the http credentials in the node-red settings and I’ve even tried using the native Hassio credentials. Neither works.

Running out of ideas. Any suggestions?

3 Likes

Very good! I was struggling with the /hassio/ingress/ URL structure because it would load my NodeRed plugin with a double HA navigation bar on the left. Your solution at least fixed that for me.

However… I can’t get NodeRed to work anymore:

Without setting port 1880 in the config:
NodeRed won’t load inside the panel iframe, nor by accessing the “Open web UI” button. I’m seeing the black NodeRed header, but the canvas and nodes won’t load. This has definitely something to do with update 3.0.0 > 3.0.1 or with HA update 0.91.3 > 0.91.4.

The logs don’t show any errors.

Setting port 1880 in the config.
I followed the steps in your gif at post Home Assistant Community Add-on: Node-RED. NodeRed then asks for username and password, but doesn’t accept them. I’m entirely sure that my credentials should be correct. I copied and pasted them from my plugin config.

@frenck Any idea what could cause NodeRed not to work? I’m using SSL with a custom domain (no duckdns).

1 Like

The first error messages appear in my log:

17 Apr 12:25:21 - [info] Settings file  : /etc/node-red/config.js
17 Apr 12:25:21 - [info] Context store  : 'default' [module=memory]
17 Apr 12:25:21 - [info] User directory : /config/node-red/
17 Apr 12:25:21 - [warn] Projects disabled : editorTheme.projects.enabled=false
17 Apr 12:25:21 - [info] Flows file     : /config/node-red/flows.json
17 Apr 12:25:21 - [info] Server now running at http://127.0.0.1:46836/
17 Apr 12:25:21 - [warn] Error loading credentials: SyntaxError: Unexpected token a in JSON at position 0
17 Apr 12:25:21 - [warn] Error loading flows: Error: Failed to decrypt credentials
17 Apr 12:25:21 - [info] Starting flows
17 Apr 12:25:21 - [error] [server-state-changed:8b2a5b15.0e3fe8] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:c87ab5d0.a7d8b8] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:d4a095e6.802828] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:bd82ffb5.e6ab3] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:7da2274b.c801c8] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:bf36f6e.e6fdb08] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:81ba0963.b802c8] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:53168e24.eb40b] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:bbd8742d.f1e078] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:582a0303.57dc2c] TypeError: Cannot read property 'addListener' of undefined
[12:25:21] INFO: Starting NGinx...
17 Apr 12:25:21 - [error] [server-state-changed:c4870ade.c77ff8] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:acbb870.d5fad78] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:9b3965.3059e698] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:14bf4038.47c8c] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:40c4aae8.7cb394] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:8f3fcb97.7bdb38] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:21 - [error] [server-state-changed:e6143783.289248] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:78beaa54.f813a4] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:86eddb67.fd7178] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:8cb66a0f.be0d38] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:21f8695a.1bc056] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:c66e0c5b.f7cc8] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:df2db866.6b6a68] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:9cccc551.76b578] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:11de23ad.76d98c] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:790f311b.3f73c] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [error] [server-state-changed:2d9e9e60.6615a2] TypeError: Cannot read property 'addListener' of undefined
17 Apr 12:25:22 - [info] Started flows

Edit 18-04-2019: Today I decided to revert back to NodeRed 3.0.0 and Hassio 0.91.3, because that’s when NodeRed still worked. I found out that reverting didn’t fix anything. The log errors are gone and my automations started to work again, but I can’t reach the NodeRed interface anymore.

I tried to find the cause, but couldn’t find a solution. I deleted everything that could have been stored: app data, cookies, history etc. Without any success. I’m looking forward to a solution!

Seeing the same thing here. No matter what username or password I put in, it doesn’t go all the way through. This is also a browser popup login and not the normal Node-Red login screen so maybe that’s a clue to what the issue is?

Oddly, I get past the initial browser login with my hassio creds and then the node red page partially loads and another browser login window pops up. Ultimately never getting past this point. Not a game breaker for me as the ingress version works just fine but it was nice opening the flows full screen without the hassio bars taking up some space.

What hassio and nodered version do you use? How did you get the ingress version to work? I can’t get anything to work anymore :frowning:

Please advice how can I specify max-old-space-size for node red hassio container?

Currently, you can’t. It is by default at 512Mb, you need more?