Chromecast devices: "Error reading from socket" + "Failed to connect to service HostServiceInfo()"
The problem
Using a barebones installation of Home Assistant Core 2024.7.3, I get a constant stream of errors all concerning Chromecast devices in my home. I haven't altered the Chromecast settings in any way, so I don't know why these errors keep showing up. Please see the attached error log for details.
Shouldn't it work out of the box?
What version of Home Assistant Core has the issue?
2024.7.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
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?
Logger: pychromecast.socket_client
Source: deps/lib/python3.12/site-packages/pychromecast/socket_client.py:616
[Pixel Tablet(192.168.86.33):8009] Error reading from socket.
Logger: pychromecast.socket_client
Source: deps/lib/python3.12/site-packages/pychromecast/socket_client.py:655
First occured: 22:10:11 (1 events)
Last logged: 22:10:11
[Pixel Tablet(192.168.86.33):8009] Error communicating with socket, resetting connection
Logger: pychromecast.socket_client
Source: deps/lib/python3.12/site-packages/pychromecast/socket_client.py:412
First occured: 22:10:47 (1 events)
Last logged: 22:10:47
[Pixel Tablet(192.168.86.33):8009] Failed to connect to service HostServiceInfo(host='192.168.86.33', port=8009), retrying in 5.0s
Additional information
No response
Most of it is log spam. I've opened a request to reduce it here: https://github.com/home-assistant-libs/pychromecast/pull/933
One of the entries above looks somewhat correct with a failure to connect.
Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration (cast) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of cast can trigger bot actions by commenting:
-
@home-assistant closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign castRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
cast documentation cast source (message by IssueLinks)
I have the same issue. Only happens once a day, overnight on every device.
same issue here. only happens when streaming music from LMS addon every two or three songs. streaming from jellyfin is without any issues.
It looks like @elupus PR to the underlying library has been merged in. I think all that would remain to knock this out is to bump the version numbers of the library in the Core repository? https://github.com/home-assistant/core/blob/dev/homeassistant/components/cast/manifest.json
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.
Same issue here: home-assistant_cast_2024-12-24T08-33-52.052Z.log
Registratore: pychromecast.socket_client
Fonte: /usr/local/lib/python3.13/site-packages/pychromecast/socket_client.py:416
Prima occorrenza: 23 dicembre 2024 alle ore 20:48:49 (14 occorrenze)
Ultimo accesso: 04:40:05
[Salotto(192.168.100.179):8009] Failed to connect to service HostServiceInfo(host='192.168.100.179', port=8009), retrying in 5.0s
[Grigetto Arianna(192.168.100.21):8009] Failed to connect to service HostServiceInfo(host='192.168.100.21', port=8009), retrying in 5.0s
[Bagno(192.168.100.189):8009] Failed to connect to service HostServiceInfo(host='192.168.100.189', port=8009), retrying in 5.0s
[Camera da letto(192.168.100.166):8009] Failed to connect to service HostServiceInfo(host='192.168.100.166', port=8009), retrying in 5.0s
[Grigetto(192.168.100.28):8009] Failed to connect to service HostServiceInfo(host='192.168.100.28', port=8009), retrying in 5.0s
It doesn't only happen at night (when the Nests seem to reboot themselves on schedule) but also during the day. The internet works fine without interruptions. I don't have separate VLANs or subnets. The Wifi works well and the signal is good
Row 49: 2024-12-23 20:48:49.780 ERROR (Thread-64) [pychromecast.socket_client] [Salotto(192.168.100.179):8009] Failed to connect to service HostServiceInfo(host='192.168.100.179', port=8009), retrying in 5.0s
Row 50: 2024-12-23 20:53:00.661 ERROR (Thread-64) [pychromecast.socket_client] [Salotto(192.168.100.179):8009] Failed to connect to service HostServiceInfo(host='192.168.100.179', port=8009), retrying in 5.0s
Row 114: 2024-12-24 00:43:08.791 ERROR (Thread-71) [pychromecast.socket_client] [Camera da letto(192.168.100.166):8009] Failed to connect to service HostServiceInfo(host='192.168.100.166', port=8009), retrying in 5.0s
Row 115: 2024-12-24 02:00:10.509 ERROR (Thread-64) [pychromecast.socket_client] [Salotto(192.168.100.179):8009] Failed to connect to service HostServiceInfo(host='192.168.100.179', port=8009), retrying in 5.0s
Row 117: 2024-12-24 02:11:00.109 ERROR (Thread-10) [pychromecast.socket_client] [Tutta casa(192.168.100.132):32016] Failed to connect to service HostServiceInfo(host='192.168.100.132', port=32016), retrying in 5.0s
Row 118: 2024-12-24 02:11:29.347 ERROR (Thread-9) [pychromecast.socket_client] [Cucina([::ffff:c0a8:6484]):8009] Failed to connect to service HostServiceInfo(host='[::ffff:c0a8:6484]', port=8009), retrying in 5.0s
Row 120: 2024-12-24 02:13:48.925 ERROR (Thread-7) [pychromecast.socket_client] [Cameretta(192.168.100.241):8009] Failed to connect to service HostServiceInfo(host='192.168.100.241', port=8009), retrying in 5.0s
Row 156: 2024-12-24 02:31:14.910 ERROR (Thread-64) [pychromecast.socket_client] [Salotto(192.168.100.179):8009] Failed to connect to service HostServiceInfo(host='192.168.100.179', port=8009), retrying in 5.0s
Row 157: 2024-12-24 02:34:58.078 ERROR (Thread-8) [pychromecast.socket_client] [Grigetto Arianna(192.168.100.21):8009] Failed to connect to service HostServiceInfo(host='192.168.100.21', port=8009), retrying in 5.0s
Row 158: 2024-12-24 02:52:46.581 ERROR (Thread-64) [pychromecast.socket_client] [Salotto(192.168.100.179):8009] Failed to connect to service HostServiceInfo(host='192.168.100.179', port=8009), retrying in 5.0s
Row 159: 2024-12-24 03:11:59.736 ERROR (Thread-6) [pychromecast.socket_client] [Bagno(192.168.100.189):8009] Failed to connect to service HostServiceInfo(host='192.168.100.189', port=8009), retrying in 5.0s
Row 160: 2024-12-24 03:14:54.709 ERROR (Thread-71) [pychromecast.socket_client] [Camera da letto(192.168.100.166):8009] Failed to connect to service HostServiceInfo(host='192.168.100.166', port=8009), retrying in 5.0s
Row 161: 2024-12-24 04:40:05.055 ERROR (Thread-5) [pychromecast.socket_client] [Grigetto(192.168.100.28):8009] Failed to connect to service HostServiceInfo(host='192.168.100.28', port=8009), retrying in 5.0s
I have 4 Google Nest Minis and a Google Nest Speaker plus a single speaker group that contains all 5 of them
Same.
I have the same issue
@emontnemery can you please dive into this, i have the same issue. This causes Home-Assistant (docker) to crash - duplicate of #135428
I have a similar problem with my 2x Nest Hubs and 2x Nest Minis. The HA log error messages (shown below) are recorded every night and seem to occur after the Google devices perform their nightly reboot after 2am. This causes the speakers to become 'unavailable' and then to be shown as 'turned off' around seven seconds later. An automation that then attempts to play a rado station on one of the Nest Minis at 7am subsequently fails.
Logger: pychromecast.socket_client
Source: /usr/local/lib/python3.13/site-packages/pychromecast/socket_client.py:416
First occurred: 02:08:52 (4 occurrences)
Last logged: 04:33:13
[Landing speaker(192.168.178.30):8009] Failed to connect to service HostServiceInfo(host='192.168.178.30', port=8009), retrying in 5.0s
[Kitchen hub(192.168.178.44):8009] Failed to connect to service HostServiceInfo(host='192.168.178.44', port=8009), retrying in 5.0s
[Attic speaker(192.168.178.31):8009] Failed to connect to service HostServiceInfo(host='192.168.178.31', port=8009), retrying in 5.0s
[Study hub(192.168.178.58):8009] Failed to connect to service HostServiceInfo(host='192.168.178.58', port=8009), retrying in 5.0s
Logger: pychromecast.socket_client
Source: /usr/local/lib/python3.13/site-packages/pychromecast/socket_client.py:624
First occurred: 04:16:54 (2 occurrences)
Last logged: 04:33:13
[Kitchen hub(192.168.178.44):8009] Error reading from socket: socket connection broken
[Study hub(192.168.178.58):8009] Error reading from socket: socket connection broken
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.
The problem still exists, even with the latest Home Assistant version
Still a problem for me too