hassio-addons / addon-node-red

Node-RED - Home Assistant Community Add-ons
https://addons.community
MIT License
529 stars 122 forks source link

This add-ons takes me global system freeze and Timeout API error #1844

Closed Stefano201 closed 5 months ago

Stefano201 commented 7 months ago

Before January I've never had any problems with this add-on, but with the newest versions I have frequent freeze (3-4 in an hour) because of these type of errors:

Supervisor:

24-02-18 20:00:06 INFO (MainThread) [supervisor.host.info] Updating local host information
24-02-18 20:00:07 INFO (MainThread) [supervisor.host.services] Updating service information
24-02-18 20:00:07 INFO (MainThread) [supervisor.host.network] Updating local network information
24-02-18 20:00:08 INFO (MainThread) [supervisor.host.sound] Updating PulseAudio information
24-02-18 20:00:09 INFO (MainThread) [supervisor.host.manager] Host information reload completed

24-02-18 20:02:25 WARNING (MainThread) [supervisor.misc.tasks] Watchdog missing application response from core_mosquitto
24-02-18 20:02:26 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.

24-02-18 20:02:27 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Cannot proxy websocket message of unsupported type: 257
24-02-18 20:02:27 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Cannot proxy websocket message of unsupported type: 257

24-02-18 20:02:27 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
24-02-18 20:02:28 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
24-02-18 20:02:44 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
24-02-18 20:02:44 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
24-02-18 20:02:44 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
24-02-18 20:02:44 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
24-02-18 20:02:44 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
24-02-18 20:02:44 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running

Core:

2024-02-18 20:02:38.404 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547237622336] Supervisor from 172.30.32.2 (HomeAssistantSupervisor/2024.01.1 aiohttp/3.9.3 Python/3.12): Unexpected error inside websocket API
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/http.py", line 385, in async_handle
msg = await wsock.receive()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_ws.py", line 486, in receive
await self.pong(msg.data)
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_ws.py", line 328, in pong
await self._writer.pong(message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 709, in pong
await self._send_frame(message, WSMsgType.PONG)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
self._write(header + message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

2024-02-18 20:02:39.402 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 715, in ping
await self._send_frame(message, WSMsgType.PING)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
self._write(header + message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

2024-02-18 20:02:39.440 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 715, in ping
await self._send_frame(message, WSMsgType.PING)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
self._write(header + message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

Supervisor:

24-02-18 18:50:32 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
24-02-18 18:50:32 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
24-02-18 18:51:02 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
24-02-18 19:06:04 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Cannot proxy websocket message of unsupported type: 257
24-02-18 19:06:04 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
24-02-18 19:06:05 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Cannot proxy websocket message of unsupported type: 257
24-02-18 19:06:05 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed

24-02-18 19:06:37 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.
24-02-18 19:06:42 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.
24-02-18 19:06:42 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.
24-02-18 19:07:28 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.
24-02-18 19:07:29 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.

24-02-18 19:07:32 WARNING (MainThread) [supervisor.homeassistant.websocket] Connection is closed
24-02-18 19:07:36 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
24-02-18 19:07:37 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
24-02-18 19:07:37 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
24-02-18 19:07:37 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
24-02-18 19:07:38 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
24-02-18 19:07:38 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
24-02-18 19:21:08 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token

24-02-18 19:28:21 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.

24-02-18 19:28:29 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Cannot proxy websocket message of unsupported type: 257
24-02-18 19:28:29 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Cannot proxy websocket message of unsupported type: 257
24-02-18 19:28:30 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
24-02-18 19:28:30 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
24-02-18 19:28:50 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
24-02-18 19:28:50 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
24-02-18 19:28:50 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
24-02-18 19:28:50 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered
24-02-18 19:28:50 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
24-02-18 19:28:50 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running
24-02-18 19:46:39 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.
24-02-18 19:46:48 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Cannot proxy websocket message of unsupported type: 257
24-02-18 19:46:48 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed
24-02-18 19:46:48 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Cannot proxy websocket message of unsupported type: 257
24-02-18 19:46:48 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed

24-02-18 19:47:44 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.
24-02-18 19:47:45 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.
24-02-18 19:48:20 ERROR (MainThread) [supervisor.homeassistant.api] Timeout on call http://172.30.32.1:8123/api/core/state.

24-02-18 19:48:29 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize
24-02-18 19:48:30 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize

Core:

2024-02-18 19:29:41.691 ERROR (MainThread) [custom_components.tapo_control] HTTPSConnectionPool(host='192.168.1.113', port=443): Max retries exceeded with url: /stok=453c37d512095564d7903c214d0e3661/ds (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1000)')))

2024-02-18 19:48:25.700 ERROR (Thread-12 (_thread_main)) [paho.mqtt.client] failed to receive on socket: [Errno 32] Broken pipe

2024-02-18 19:48:25.810 WARNING (Thread-12 (_thread_main)) [homeassistant.components.mqtt.client] Disconnected from MQTT server 192.168.1.49:1883 (7)

2024-02-18 19:48:26.996 ERROR (MainThread) [custom_components.tapo_control] ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

2024-02-18 19:48:27.128 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547244313024] Supervisor from 172.30.32.2 (HomeAssistantSupervisor/2024.01.1 aiohttp/3.9.3 Python/3.12): Unexpected error inside websocket API
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/http.py", line 385, in async_handle
msg = await wsock.receive()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_ws.py", line 486, in receive
await self.pong(msg.data)
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_ws.py", line 328, in pong
await self._writer.pong(message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 709, in pong
await self._send_frame(message, WSMsgType.PONG)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
self._write(header + message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

2024-02-18 19:48:27.454 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547244316864] Supervisor from 172.30.32.2 (HomeAssistantSupervisor/2024.01.1 aiohttp/3.9.3 Python/3.12): Unexpected error inside websocket API
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/http.py", line 385, in async_handle
msg = await wsock.receive()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_ws.py", line 486, in receive
await self.pong(msg.data)
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_ws.py", line 328, in pong
await self._writer.pong(message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 709, in pong
await self._send_frame(message, WSMsgType.PONG)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
self._write(header + message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
2024-02-18 19:48:27.722 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 715, in ping
await self._send_frame(message, WSMsgType.PING)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
self._write(header + message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
2024-02-18 19:48:27.831 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 715, in ping
await self._send_frame(message, WSMsgType.PING)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
self._write(header + message)
File "/usr/local/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

If I stop the add-on these errors disappear.

@frenck can you investigate about this problem? Thank you

Stefano201 commented 7 months ago

Unfortunately, I don't have older backup

Stefano201 commented 7 months ago

UP

digitalMedic commented 7 months ago

I am getting the same thing. WHen running the node-red addon, my home assistant becomes very slow and unresponsive. Also, the supervisor log starts to report that all my addons are unhealthy and restarts them. Once I stop node-red, it all clears up.

Logger: homeassistant.components.hassio Source: components/hassio/websocket_api.py:138 Integration: Home Assistant Supervisor (documentation, issues) First occurred: 18:21:37 (7 occurrences) Last logged: 18:28:19

Failed to to call /addons/a0d7b954_nodered/stats - Failed to to call /backups - Failed to to call /host/info - Failed to to call /addons -

image

Stefano201 commented 7 months ago

I don't understand why nobody give us an answer... There are a lot of issues with the latest versions of node-red

Salsalove commented 7 months ago

UP

digitalMedic commented 6 months ago

I think I was able to fix this issue. The problem appears to be that there are nodes that need to be updated (I had three). It took a long time, but I got them all updated and everything seems to be working now. I started node-red and entered the webui. I had to wait until it came up because everything was running really slow. Then I updated the first node. I let it sit until I got a pop up that said node added. I then restarted node-red and then updated the next node. Once I got the pop up add box, I restarted node-red again. I kept doing this until all the nodes were updated. Again, it will take a while. Once all the nodes were updated, I stopped node-red and rebooted the HA server. Once HA was up and running, node-red started and so far everything seems to be working again.

Salsalove commented 6 months ago

I think I was able to fix this issue. The problem appears to be that there are nodes that need to be updated (I had three). It took a long time, but I got them all updated and everything seems to be working now. I started node-red and entered the webui. I had to wait until it came up because everything was running really slow. Then I updated the first node. I let it sit until I got a pop up that said node added. I then restarted node-red and then updated the next node. Once I got the pop up add box, I restarted node-red again. I kept doing this until all the nodes were updated. Again, it will take a while. Once all the nodes were updated, I stopped node-red and rebooted the HA server. Once HA was up and running, node-red started and so far everything seems to be working again.

Unfortunately, updating nodes doesn't resolve my issues.

digitalMedic commented 6 months ago

Yeah, I checked today and node-red is still causing issues. That was not the fix.

Salsalove commented 6 months ago

@frenck 🙏🏼

digitalMedic commented 6 months ago

The new version, 17.0.10 seems to have fixed the freezing and crashing. There are no errors in the HA supervisor log either.

Salsalove commented 6 months ago

The new version, 17.0.10 seems to have fixed the freezing and crashing. There are no errors in the HA supervisor log either.

Unfortunately i have this version but there are errors and freeze

github-actions[bot] commented 5 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!