Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

HA goes unresponsive and does not load the web UI when nabucasa cannot connect to cloud server #121084

Open
estebanz01 opened this issue Jul 3, 2024 · 7 comments

Comments

@estebanz01
Copy link

The problem

Hola! 馃憢

So after moving from 2024.05 to 2024.06.4 I've noticed that after 24 hs, every day, HA goes unresponsive and I have to force a restart on the service in order to access it again properly. Some debugging and looking around later, I found out that this is happening exactly when my ISP drops my connection (which happens daily at the same time, it's a pain in the butt).

So looking at the errors in the log, it seems that when the hass-nabucasa integration loses internet connection, it hangs in the TCP forever, not healing itself, hence blocking the entire HA process and leaving an unresponsive UI.

Let me know if I'm missing some additional info and I'll update the ticket.

What version of Home Assistant Core has the issue?

core-2024.6.4

What was the last working version of Home Assistant Core?

core-2024.5.5

What type of installation are you running?

Home Assistant Core

Integration causing the issue

hass-nabucasa

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Jul 03 07:47:40 raspberrypi hass[149923]: OSError: [Errno 101] Network is unreachable
Jul 03 07:47:47 raspberrypi hass[149923]: 2024-07-03 07:47:47.175 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 101] Network is unreachable, transport: <_SelectorDatagramTransport fd=66 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=66, family=2, type=2, proto=0, laddr=('0.0.0.0', 48594)>
Jul 03 07:47:52 raspberrypi hass[149923]: 2024-07-03 07:47:52.096 ERROR (MainThread) [hass_nabucasa.remote] Connection problem to snitun server (Can't connect to SniTun server us-east-1-0.ui.nabu.casa:443 with: [Errno -3] Temporary failure in name resolution)
Jul 03 07:48:08 raspberrypi hass[149923]: 2024-07-03 07:48:08.736 ERROR (MainThread) [hass_nabucasa.remote] Connection problem to snitun server (Can't connect to SniTun server us-east-1-0.ui.nabu.casa:443 with: [Errno 113] Connect call failed ('23.21.100.229', 443))
Jul 03 08:57:32 raspberrypi hass[149923]: 2024-07-03 08:57:32.181 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Jul 03 08:57:32 raspberrypi hass[149923]: Traceback (most recent call last):
Jul 03 08:57:32 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 715, in ping
Jul 03 08:57:32 raspberrypi hass[149923]:     await self._send_frame(message, WSMsgType.PING)
Jul 03 08:57:32 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
Jul 03 08:57:32 raspberrypi hass[149923]:     self._write(header + message)
Jul 03 08:57:32 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
Jul 03 08:57:32 raspberrypi hass[149923]:     raise ConnectionResetError("Cannot write to closing transport")
Jul 03 08:57:32 raspberrypi hass[149923]: ConnectionResetError: Cannot write to closing transport
Jul 03 08:58:15 raspberrypi hass[149923]: 2024-07-03 08:58:15.181 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Jul 03 08:58:15 raspberrypi hass[149923]: Traceback (most recent call last):
Jul 03 08:58:15 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 715, in ping
Jul 03 08:58:15 raspberrypi hass[149923]:     await self._send_frame(message, WSMsgType.PING)
Jul 03 08:58:15 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
Jul 03 08:58:15 raspberrypi hass[149923]:     self._write(header + message)
Jul 03 08:58:15 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
Jul 03 08:58:15 raspberrypi hass[149923]:     raise ConnectionResetError("Cannot write to closing transport")
Jul 03 08:58:15 raspberrypi hass[149923]: ConnectionResetError: Cannot write to closing transport
Jul 03 09:06:44 raspberrypi hass[149923]: 2024-07-03 09:06:44.181 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Jul 03 09:06:44 raspberrypi hass[149923]: Traceback (most recent call last):
Jul 03 09:06:44 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 715, in ping
Jul 03 09:06:44 raspberrypi hass[149923]:     await self._send_frame(message, WSMsgType.PING)
Jul 03 09:06:44 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
Jul 03 09:06:44 raspberrypi hass[149923]:     self._write(header + message)
Jul 03 09:06:44 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
Jul 03 09:06:44 raspberrypi hass[149923]:     raise ConnectionResetError("Cannot write to closing transport")
Jul 03 09:06:44 raspberrypi hass[149923]: ConnectionResetError: Cannot write to closing transport
Jul 03 09:15:10 raspberrypi hass[149923]: 2024-07-03 09:15:10.180 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Jul 03 09:15:10 raspberrypi hass[149923]: Traceback (most recent call last):
Jul 03 09:15:10 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 715, in ping
Jul 03 09:15:10 raspberrypi hass[149923]:     await self._send_frame(message, WSMsgType.PING)
Jul 03 09:15:10 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
Jul 03 09:15:10 raspberrypi hass[149923]:     self._write(header + message)
Jul 03 09:15:10 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
Jul 03 09:15:10 raspberrypi hass[149923]:     raise ConnectionResetError("Cannot write to closing transport")
Jul 03 09:15:10 raspberrypi hass[149923]: ConnectionResetError: Cannot write to closing transport
Jul 03 09:22:45 raspberrypi hass[149923]: 2024-07-03 09:22:45.182 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Jul 03 09:22:45 raspberrypi hass[149923]: Traceback (most recent call last):
Jul 03 09:22:45 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 715, in ping
Jul 03 09:22:45 raspberrypi hass[149923]:     await self._send_frame(message, WSMsgType.PING)
Jul 03 09:22:45 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 682, in _send_frame
Jul 03 09:22:45 raspberrypi hass[149923]:     self._write(header + message)
Jul 03 09:22:45 raspberrypi hass[149923]:   File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/http_websocket.py", line 702, in _write
Jul 03 09:22:45 raspberrypi hass[149923]:     raise ConnectionResetError("Cannot write to closing transport")
Jul 03 09:22:45 raspberrypi hass[149923]: ConnectionResetError: Cannot write to closing transport

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jul 3, 2024

Hey there @home-assistant/cloud, mind taking a look at this issue as it has been labeled with an integration (cloud) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of cloud can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign cloud Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


cloud documentation
cloud source
(message by IssueLinks)

@bemble
Copy link
Member

bemble commented Jul 4, 2024

@estebanz01 Thanks for the details, we'll investigate.

@ludeeus
Copy link
Member

ludeeus commented Jul 4, 2024

@estebanz01 When this happened, was it just over the remote URL you tried, or was it also the local (IP) connection?

Can you post your system health information and the diagnostics from any integration (does not matter which)

@estebanz01
Copy link
Author

It happens in both connection types. By LAN, it shows the loading data spinner but it stays there, with remote URL, only shows the HA logo and also hangs.

On the iOS app, same behaviour. I'll post the system health and the diagnostics soon.

@estebanz01
Copy link
Author

System Information

version core-2024.6.4
installation_type Home Assistant Core
dev false
hassio false
docker false
user homeassistant
virtualenv true
python_version 3.12.2
os_name Linux
os_version 6.1.29-v8+
arch aarch64
timezone America/Bogota
config_dir /home/homeassistant/.homeassistant
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4967
Installed Version 1.34.0
Stage running
Available Repositories 1385
Downloaded Repositories 4
Home Assistant Cloud
logged_in true
subscription_expiration 8 January 2025 at 19:00
relayer_connected false
relayer_region null
remote_enabled true
remote_connected false
alexa_enabled false
google_enabled true
remote_server null
certificate_status null
instance_id ec70fa5f3e744848a672131e4f14a08f
can_reach_cert_server failed to load: timeout
can_reach_cloud_auth failed to load: timeout
can_reach_cloud ok
Dashboards
dashboards 6
resources 5
views 12
mode storage
Recorder
oldest_recorder_run 25 June 2024 at 16:04
current_recorder_run 4 July 2024 at 10:39
estimated_db_size 245.56 MiB
database_engine mysql
database_version 10.5.23

Attached is the diagnostics log for system monitor integration.
config-systemmonitor.json

@ludeeus
Copy link
Member

ludeeus commented Jul 8, 2024

I do not believe the logs posted here from hass-nabucasa are the reason for the misbehavior; they seem to be just symptoms.

What operating system are you running this on?

There are a few things you can try:

  1. Update Home Assistant to 2024.7+
  2. Restart Home Assistant in safe mode
  3. Disable IPv6

@estebanz01
Copy link
Author

hi,

yeah, I had the same feeling. I just posted what I felt it could be the main issue atm.

It still happens with HA 2024.7.1 and IPv6 is disabled on my pi 4b, but I don't see why IPv6 could a problem.

Regarding HA in safe mode, I'll give it a go and report back tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants