home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.8k stars 30.9k forks source link

Slow SSH and HA not loading from Docker #119252

Open waihankan opened 5 months ago

waihankan commented 5 months ago

The problem

I installed home assistant docker on raspberry pi 5, 8Gb. SD Card seems to be reading and writing fast enough.

The problem I'm facing is it's so slow to boot the home assistant container sometimes. Sometimes, it's very fast, like less than 10 seconds. But other times, it will slow down everything, including SSH (I'm running headless on Raspberry Pi OS Lite). Basically, can't do anything until I kill the docker container. Where should I start to debug?

Also, a bunch of warning and error logs will come up.

What version of Home Assistant Core has the issue?

home-assistant:stable

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

No response

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?

[+] Running 3/3
 ⠿ Network homeassistant_default  Created                                                                                                                                                0.1s
 ⠿ Container homeassistant        Created                                                                                                                                                0.2s
 ⠿ Container portainer            Created                                                                                                                                                0.2s
Attaching to homeassistant, portainer
homeassistant  | s6-rc: info: service s6rc-oneshot-runner: starting
homeassistant  | s6-rc: info: service s6rc-oneshot-runner successfully started
homeassistant  | s6-rc: info: service fix-attrs: starting
homeassistant  | s6-rc: info: service fix-attrs successfully started
homeassistant  | s6-rc: info: service legacy-cont-init: starting
homeassistant  | s6-rc: info: service legacy-cont-init successfully started
homeassistant  | s6-rc: info: service legacy-services: starting
homeassistant  | services-up: info: copying legacy longrun home-assistant (no readiness notification)
homeassistant  | s6-rc: info: service legacy-services successfully started
portainer      | 2024/06/10 03:04AM INF github.com/portainer/portainer/api/cmd/portainer/main.go:530 > encryption key file not present | filename=portainer
portainer      | 2024/06/10 03:04AM INF github.com/portainer/portainer/api/cmd/portainer/main.go:549 > proceeding without encryption key |
portainer      | 2024/06/10 03:04AM INF github.com/portainer/portainer/api/database/boltdb/db.go:124 > loading PortainerDB | filename=portainer.db
portainer      | 2024/06/10 03:04:14 server: Reverse tunnelling enabled
portainer      | 2024/06/10 03:04:14 server: Fingerprint b9:9f:8e:27:15:b9:3c:7c:46:39:93:dd:a3:42:ad:c7
portainer      | 2024/06/10 03:04:14 server: Listening on 0.0.0.0:8000...
portainer      | 2024/06/10 03:04AM INF github.com/portainer/portainer/api/cmd/portainer/main.go:789 > starting Portainer | build_number=25294 go_version=1.19.3 image_tag=linux-arm64-2.16.2 nodejs_version=18.12.1 version=2.16.2 webpack_version=5.68.0 yarn_version=1.22.19
portainer      | 2024/06/10 03:04AM INF github.com/portainer/portainer/api/http/server.go:337 > starting HTTPS server | bind_address=:9443
portainer      | 2024/06/10 03:04AM INF github.com/portainer/portainer/api/http/server.go:322 > starting HTTP server | bind_address=:9000
ahomeassistant  | 2024-06-09 20:04:51.696 ERROR (MainThread) [homeassistant.components.homeassistant_alerts.coordinator] Timeout fetching homeassistant_alerts data
homeassistant  | 2024-06-09 20:04:59.110 ERROR (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Failed to connect to service MDNSServiceInfo(name='Google-Home-Mini-387569a1420ab6ae1bcd9b9282393266._googlecast._tcp.local.'), retrying in 5.0s
homeassistant  | 2024-06-09 20:06:10.090 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:07:01.908 ERROR (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Failed to connect to service MDNSServiceInfo(name='Google-Home-Mini-387569a1420ab6ae1bcd9b9282393266._googlecast._tcp.local.'), retrying in 5.0s
ahomeassistant  | 2024-06-09 20:04:51.696 ERROR (MainThread) [homeassistant.components.homeassistant_alerts.coordinator] Timeout fetching homeassistant_alerts data
homeassistant  | 2024-06-09 20:04:59.110 ERROR (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Failed to connect to service MDNSServiceInfo(name='Google-Home-Mini-387569a1420ab6ae1bcd9b9282393266._googlecast._tcp.local.'), retrying in 5.0s
homeassistant  | 2024-06-09 20:06:10.090 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:07:01.908 ERROR (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Failed to connect to service MDNSServiceInfo(name='Google-Home-Mini-387569a1420ab6ae1bcd9b9282393266._googlecast._tcp.local.'), retrying in 5.0s
homeassistant  | 2024-06-09 20:11:09.324 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:11:25.110 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 2601:644:400:5c40:48c6:5338:a8e7:4162 (2601:644:400:5c40:48c6:5338:a8e7:4162). Requested URL: '/auth/token'. (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36)
homeassistant  | 2024-06-09 20:11:45.472 ERROR (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Failed to connect to service HostServiceInfo(host='10.0.0.239', port=8009), retrying in 5.0s
homeassistant  | 2024-06-09 20:12:08.764 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [140733842335216] from 10.0.0.111 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36): Disconnected: Did not receive auth message within 10 seconds
homeassistant  | 2024-06-09 20:12:47.462 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:13:17.493 ERROR (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Failed to connect to service HostServiceInfo(host='10.0.0.239', port=8009), retrying in 5.0s
homeassistant  | 2024-06-09 20:14:00.894 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [140733842335216] from 10.0.0.251 (Home Assistant/2024.5.1 (io.robbie.HomeAssistant; build:2024.688; iOS 17.5.1)): Disconnected: Did not receive auth message within 10 seconds
homeassistant  | 2024-06-09 20:14:21.283 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:14:34.343 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [140733842335216] from 10.0.0.251 (Home Assistant/2024.5.1 (io.robbie.HomeAssistant; build:2024.688; iOS 17.5.1)): Disconnected: Did not receive auth message within 10 seconds
homeassistant  | 2024-06-09 20:14:52.433 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:15:00.361 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [140733842341408] from 10.0.0.251 (Home Assistant/2024.5.1 (io.robbie.HomeAssistant; build:2024.688; iOS 17.5.1)): Disconnected: Did not receive auth message within 10 seconds
homeassistant  | 2024-06-09 20:15:20.281 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:15:50.312 ERROR (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Failed to connect to service HostServiceInfo(host='10.0.0.239', port=8009), retrying in 5.0s
homeassistant  | 2024-06-09 20:17:30.693 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:17:36.791 WARNING (MainThread) [homeassistant.components.websocket_api.http.connection] [140733842333776] from 10.0.0.251 (Home Assistant/2024.5.1 (io.robbie.HomeAssistant; build:2024.688; iOS 17.5.1)): Disconnected: Did not receive auth message within 10 seconds
homeassistant  | 2024-06-09 20:18:02.732 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:18:32.243 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 10.0.0.251 (10.0.0.251). Requested URL: '/auth/token'. (HomeAssistant-Extensions-PushProvider/2024.5.1 (io.robbie.HomeAssistant.PushProvider; build:2024.688; iOS 17.5.1) Alamofire/5.8.0)
homeassistant  | 2024-06-09 20:18:36.958 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:19:06.678 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:19:39.761 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 2601:644:400:5c40:48c6:5338:a8e7:4162 (2601:644:400:5c40:48c6:5338:a8e7:4162). Requested URL: '/auth/token'. (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36)
homeassistant  | 2024-06-09 20:19:45.427 ERROR (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Failed to connect to service MDNSServiceInfo(name='Google-Home-Mini-387569a1420ab6ae1bcd9b9282393266._googlecast._tcp.local.'), retrying in 5.0s
homeassistant  | 2024-06-09 20:20:18.248 WARNING (Thread-4) [pychromecast.socket_client] [Bedroom speaker(10.0.0.239):8009] Heartbeat timeout, resetting connection
homeassistant  | 2024-06-09 20:20:55.647 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 10.0.0.251 (10.0.0.251). Requested URL: '/auth/token'. (HomeAssistant-Extensions-PushProvider/2024.5.1 (io.robbie.HomeAssistant.PushProvider; build:2024.688; iOS 17.5.1) Alamofire/5.8.0)
homeassistant  | 2024-06-09 20:21:13.158 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 10.0.0.251 (10.0.0.251). Requested URL: '/auth/token'. (HomeAssistant-Extensions-PushProvider/2024.5.1 (io.robbie.HomeAssistant.PushProvider; build:2024.688; iOS 17.5.1) Alamofire/5.8.0)
homeassistant  | 2024-06-09 20:22:21.909 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 10.0.0.251 (10.0.0.251). Requested URL: '/auth/token'. (HomeAssistant-Extensions-PushProvider/2024.5.1 (io.robbie.HomeAssistant.PushProvider; build:2024.688; iOS 17.5.1) Alamofire/5.8.0)

Additional information

After putting usernames and passwords, I'm stuck there.

image

No response

waihankan commented 5 months ago

Update. I think this has something to do with the network host. I tried using port 8123:8123 and it works now for some reasons. Any reasons behind this? It would be good if someone figured it out.

waihankan commented 5 months ago

Not working again :((. It stops working after I turned off raspberry pi and turn it back on.

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

waihankan commented 2 months ago

It worked when I switched to ubuntu server OS instead of raspberry pi.