Node-Red broken after HA Update (0.105.2 + OS update) #444
cjramseyer posted onGitHub
Problem/Motivation
I have been running Node-Red for all of my automations. It has been working great and so far been extremely stable. I attempted upgrade Home-Assistant (rPi 3B+, HA 0.105.2, HassOS 3.9) which failed to start/restart Node-Red following upgrade.
Expected behavior
I expected Node-Red to start/restart after the upgrade
Actual behavior
Node-Red attempted to start, complained about many plugins, including telegram, and nginx (I am not using either but had the nodes installed to the palette)
Steps to reproduce
Update HA to latest version and restart addins
Proposed changes
Please share a fiox for this without having to reinstall (working on that currently) and offer a "repair/safe mode" option so node-red can start to allow possible fixes for errors
:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be useful.
Im also having issues after upgrading nodered and hassio/home assistant on my pi 4. Still haven't found a solution. I tried uninstalling/reinstalling. Then I uninstalled, removed the node-red config folders from the config directory and reinstalling. Still nothing. This is the error in the log when trying to start it though:
20-02-13 14:54:11 ERROR (SyncWorker_2) [hassio.docker] Can't start addon_a0d7b954_nodered: 403 Client Error: Forbidden ("endpoint with name addon_a0d7b954_nodered already exists in network host")
Here is the full install/uninstall log events: 20-02-13 14:42:35 INFO (MainThread) [hassio.addons] Add-on 'a0d7b954_nodered' successfully installed 20-02-13 14:42:54 INFO (MainThread) [hassio.ingress] Update Ingress as panel for a0d7b954_nodered 20-02-13 14:43:29 INFO (MainThread) [hassio.secrets] Request secret red_secret 20-02-13 14:43:33 INFO (MainThread) [hassio.secrets] Request secret red_secret 20-02-13 14:43:54 ERROR (SyncWorker_8) [hassio.docker] Can't start addon_a0d7b954_nodered: 403 Client Error: Forbidden ("endpoint with name addon_a0d7b954_nodered already exists in network host") 20-02-13 14:44:23 INFO (SyncWorker_11) [hassio.docker.interface] Clean addon_a0d7b954_nodered application 20-02-13 14:44:28 INFO (SyncWorker_11) [hassio.docker.interface] Remove image hassioaddons/node-red-armv7 with latest and 6.0.4 20-02-13 14:44:47 INFO (MainThread) [hassio.addons.addon] Remove add-on data folder /data/addons/data/a0d7b954_nodered 20-02-13 14:44:48 INFO (MainThread) [hassio.ingress] Update Ingress as panel for a0d7b954_nodered 20-02-13 14:44:48 INFO (MainThread) [hassio.addons] Add-on 'a0d7b954_nodered' successfully removed 20-02-13 14:45:44 INFO (MainThread) [hassio.addons] Create Home Assistant add-on data folder /data/addons/data/a0d7b954_nodered 20-02-13 14:45:44 INFO (SyncWorker_9) [hassio.docker.interface] Pull image hassioaddons/node-red-armv7 tag 6.0.4. 20-02-13 14:48:42 INFO (MainThread) [hassio.addons] Add-on 'a0d7b954_nodered' successfully installed 20-02-13 14:49:57 INFO (MainThread) [hassio.ingress] Update Ingress as panel for a0d7b954_nodered 20-02-13 14:53:36 INFO (MainThread) [hassio.secrets] Request secret red_secret 20-02-13 14:53:41 INFO (MainThread) [hassio.secrets] Request secret red_secret 20-02-13 14:54:11 ERROR (SyncWorker_2) [hassio.docker] Can't start addon_a0d7b954_nodered: 403 Client Error: Forbidden ("endpoint with name addon_a0d7b954_nodered already exists in network host")
@BrewNinja Your issue doesn't appear to be the same, you may wish to try running hassio supervisor repair
from the SSH addon.
But I am having trouble restoring connectivity to hassio (hassos)
I recently jumped from 100.3 to 105.4. After upgrade, i lost 2-3 months of changes to the flows. Restore from snapshot was not working. I eventually solved by manually copying the flows from the json file in the snapshot tar and importing in the node red.
But NR flows were not working anymore. I was getting: "Call-Service attempted without connection to server"
This is how i solved, however not sure what step exactly did the trick. But i'm not omitting anything of what I did.
TLDR: uninstall the addon after taking backup, reconfigure it, then go to a service call node and try to select, then unselect, then select the checkbox of "I use the Hass.io Add-on" -> this solved the problem for me.
Long Story:
1) Take backup of the configuration of the NR addon, and all flows (export) and everything that is important for you (additional nodes in pallette, etc). 2) Uninstall the addon. 3) Rename /config/node-red to a backup. (at this step, you should not have a node-red dir in /config) 4) Reinstall the add-on 5) Restore the Config of the addon, start the addon, import your flows. Check if calls to hassio are successful. 6) if failure: Open a service call node, configure the homeassistant server. Select the "I use the Hass.io Add-on" if it's unselected. Update/Deploy. Test the call. 7) If still failure: Open a service call node, configure the homeassistant server. Unselect the "I use the Hass.io Add-on". Then select it again. Update/Deploy. Test the call - > should now be successful (hopefully)
Looks like the issue is back on specific flows. See what happens when i deploy:
21 Feb 00:24:24 - [info] Stopping flows 21 Feb 00:24:24 - [info] [server:homeassistant] Closing WebSocket http://hassio/homeassistant 21 Feb 00:24:24 - [info] [mqtt-broker:d1800c07.a4f49] Disconnected from broker: mqtt://IP:1883 21 Feb 00:24:24 - [info] Stopped flows 21 Feb 00:24:24 - [info] Starting flows 21 Feb 00:24:25 - [info] Started flows 21 Feb 00:24:27 - [info] [mqtt-broker:d1800c07.a4f49] Connected to broker: mqtt://IP:1883 21 Feb 00:24:27 - [error] [api-call-service:Switch Heater] Call-Service attempted without connection to server. 21 Feb 00:24:29 - [info] [server:homeassistant] WebSocket Connecting http://hassio/homeassistant 21 Feb 00:24:29 - [info] [server:homeassistant] WebSocket Connected to http://hassio/homeassistant
Notice that first it attempts to do an api call, then it connects to the homeassistant server. Other flows are ok, but certain flow not.
Despite using same homeassistant server with option selected "I use the Hass.io Add-on".
I see sometimes it works, when unselecting the option "Delay connection attempts" 21 Feb 00:35:27 - [info] Stopping flows 21 Feb 00:35:27 - [info] [server:homeassistant] Closing WebSocket http://hassio/homeassistant 21 Feb 00:35:27 - [info] [mqtt-broker:d1800c07.a4f49] Disconnected from broker: mqtt://IP:1883 21 Feb 00:35:27 - [info] Stopped flows 21 Feb 00:35:27 - [info] Starting flows 21 Feb 00:35:28 - [info] Started flows 21 Feb 00:35:28 - [info] [server:homeassistant] WebSocket Connecting http://hassio/homeassistant 21 Feb 00:35:29 - [info] [server:homeassistant] WebSocket Connected to http://hassio/homeassistant 21 Feb 00:35:30 - [info] [mqtt-broker:d1800c07.a4f49] Connected to broker: mqtt://IP:1883
Probably in those situations when it connects to the mqtt server first, the hassio websocket connection is delayed, and some "fast" api calls triggered during this time are failing, since there is no connection yet to the hassio websocket...
Not sure how to fix it though...
You may want to try mqtt://core-mosquitto:1883
as your broker, assuming that you are using the official addon (I think that is the internal docker name).
There appears to be multiple issues being logged here, if the issue is with the HA node red nodes, please log it upstream. The addon purely wraps the software, and as it launches, I do not believe that it is an issue here.
thanks... i'm using the official mqtt and node red addons.
I just tried based on your suggestion - the mqtt node connects properly using "core-mosquitto" on port 1883, but still same behavior with the one instance of node-red service call node, not being able to connect to the hassio. (while other nodes of same type connect properly...)
The node details: Name : service call Type : api-call-service Module : node-red-contrib-home-assistant-websocket
Sorry for silly question, I'm not familiar with the terminology... where should i log this issue? thanks, -a
ok, i think i am into something.
i manually updated this particular node in palette from 0.19.5 to 0.20.2 (manage palette) then i restarted the node-red addon, as per the instruction/popup. now i see in the logs:
21 Feb 01:24:27 - [info] Started flows 21 Feb 01:24:27 - [info] [server:Home Assistant] WebSocket Connecting http://supervisor/core 21 Feb 01:24:27 - [info] [server:Home Assistant] WebSocket Connected to http://supervisor/core 21 Feb 01:24:29 - [info] [mqtt-broker:d1800c07.a4f49] Connected to broker: mqtt://IP:1883 21 Feb 01:24:29 - [info] [mqtt-broker:core-mosquitto] Connected to broker: mqtt://core-mosquitto:1883
And i see that the culprit node also connected properly in the flow (green square under the node). I hope this lasts :)
If that's the case, then it's required a new minor release of node-red addon, that will come by default with the v0.20.2 of node-red-contrib-home-assistant-websocket.
thanks, -a
You are using manual pallets of the node-red-contrib-home-assistant-websocket.
That is your culprit, since there are breaking changes that needs to be addressed in sync with the add-on. Bypassing that manually is fine, but your problem.
The original issue in this PR was caused by a Supervisor issue, which has been addressed as well. I'm closing up this issue.
If problems still persists, please open a fresh issue with fresh logs. Thanks!
please have the patience to explain further.
You are using manual pallets of the node-red-contrib-home-assistant-websocket.
Yes, now after i see that v0.19.5 of the node is not working properly, i updated manually to 0.20.2. Now looks it's working, but are right, that there might be some further issues that are unknown to me at this point....
What is the recommended approach? If for example a new version of node-red addon is released and i update to this version, are there any consequences of my previous manual update of the palette?
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.