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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZHA not initializing with docker network as host #110208

Closed
Oglaf opened this issue Feb 10, 2024 · 3 comments · Fixed by #111159
Closed

ZHA not initializing with docker network as host #110208

Oglaf opened this issue Feb 10, 2024 · 3 comments · Fixed by #111159

Comments

@Oglaf
Copy link

Oglaf commented Feb 10, 2024

The problem

I recently updated Home Assistant from version 2024.1.6 to 2024.2.1. After the update, I encountered an issue with ZHA initialization. It hangs during initialization five times before throwing an error.

Upon inspecting the logs and diagnostics, it appears that the method self.ota.initialize() is timing out. I attempted to resolve this by switching my container from host (IPV6 enabled) to bridge (IPV4 only) mode, which seems to have resolved the issue. Unfortunately, I couldn't determine which address the integration is attempting to communicate with.

What version of Home Assistant Core has the issue?

core-2024.2.1

What was the last working version of Home Assistant Core?

ore-2024.1.6

What type of installation are you running?

Home Assistant Container

Integration causing the issue

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha/

Diagnostics information

home-assistant_zha_2024-02-10T16-47-14.743Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:444
First occurred: 13:47:10 (1 occurrences)
Last logged: 13:47:10

Error setting up entry Sonoff Zigbee 3.0 USB Dongle Plus - Sonoff Zigbee 3.0 USB Dongle Plus for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 163, in async_setup_entry
    zha_gateway = await ZHAGateway.async_from_config(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 196, in async_from_config
    await instance.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 214, in async_initialize
    await app.startup(auto_form=True)
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 226, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 219, in initialize
    await self.ota.initialize()
  File "/usr/local/lib/python3.12/site-packages/zigpy/ota/__init__.py", line 154, in initialize
    await self.async_event("initialize_provider", self._app.config[CONF_OTA])
  File "/usr/local/lib/python3.12/site-packages/zigpy/util.py", line 81, in async_event
    for result in await asyncio.gather(*tasks, return_exceptions=True):
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

Additional information

No response

@home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, @puddly, @TheJulianJES, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of zha 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 zha 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)


zha documentation
zha source
(message by IssueLinks)

@puddly
Copy link
Contributor

puddly commented Feb 10, 2024

It looks like the OTA providers do not handle failure as well as they should. This will be fixed in the next release.

@Oglaf
Copy link
Author

Oglaf commented Feb 10, 2024

Thanks @puddly! Is it possible to know which address the integration is unable to resolve?

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

Successfully merging a pull request may close this issue.

5 participants