Closed randomhammer closed 1 year ago
Also wanted to note, no Docker anywhere on this machine. Only running HA Core in a virtualenv
zeroconf documentation zeroconf source (message by IssueLinks)
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (zeroconf
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
network documentation network source (message by IssueLinks)
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (network
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
lutron_caseta documentation lutron_caseta source (message by IssueLinks)
Hey there @swails, mind taking a look at this issue as it has been labeled with an integration (lutron_caseta
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
It looks like probot-home-assistant may have spammed this out to a bunch of different folks based on my log entries. The root issue seems to be that HomeAssistant does not see an IP address when the machine reboots. I think that is why ZeroConf fails, and ZeroConf failing is why the other integrations fail. Does anyone have any idea why there is no IPv4 address when Home Assistant starts?
Nobody else has this issue? It is 100% repeatable for me
It looks like Home Assistant is being started before the system has an IP address. Try setting a static one
2022-08-11 14:57:49.938 WARNING (MainThread) [homeassistant.components.network] Because the system does not have any enabled IPv4 addresses, source address detection may be inaccurate
I have this exact same issue. Haven't found a solution yet. I tried changing from network.target to network-online.target in the unit file. No success.
https://wiki.archlinux.org/title/Systemd#Running_services_after_the_network_is_up
Check here, make sure that the proper wait service is enabled. I also added the nss-lookup.target to mine and now it works just fine. Also type=idle would make it wait until all the other services are complete before loading, might also help. I am using DHCP and it works now.
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.
For anyone who finds this in the future, there was only one way to fix the problem. What happens on reboot is that systemd sucks waiting to start services until the network is running, even with an appropriate network monitor. My solution was to simply delay the start of Home Assistant for 15 seconds by modifying the systemd unit file. This is brute force, but works all of the time. 15 seconds sufficient for the interfaces on my server to become available, and when they do ZeroConf starts just fine. The line I added to the unit is this:
ExecStartPre=/bin/sleep 15
Note that this means that restarting the unit always waits 15 seconds, but at least when my server reboots I don't need to restart HA again to clear the ZeroConf error.
The problem
Whenever I reboot the server HA Core is running on, ZeroConf and all dependent services fail to restart. The root error seems to be this:
I looked at one other solution, the one for putting a
default_interface
in #35281 but having a bit of trouble following the advice since there is no exampleconfiguration.yaml
in that issue.After issuing a restart from the developer tools everything works fine. There is also an error about no interfaces being available
Is
systemd
starting this before the network is ready?What version of Home Assistant Core has the issue?
core-2022.8.2
What was the last working version of Home Assistant Core?
core-2022.7.5
What type of installation are you running?
Home Assistant Core
Integration causing the issue
ZeroConf Component
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?
Additional information
I am running on a fast machine with a lot of resources (32GB RAM, 8 CPU cores) and Debian Bullseye. Here is the unit file that I'm using to start the service: