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

DNS issues in HA Addon #55

Closed
Meatballs1 opened this issue Apr 20, 2024 · 5 comments · Fixed by #71
Closed

DNS issues in HA Addon #55

Meatballs1 opened this issue Apr 20, 2024 · 5 comments · Fixed by #71
Assignees

Comments

@Meatballs1
Copy link
Collaborator

Meatballs1 commented Apr 20, 2024

If you look at the DNS logs on the HAOS console the names it is trying to resolve are all appended with .local.hass.io

@Meatballs1
Copy link
Collaborator Author

Meatballs1 commented Apr 20, 2024

So the /etc/resolve.conf contains search local.hass.io within the container.

Removing this and restarting the container works. Not sure if it will be updated when DHCP reloads in the container?

This is presumably being set by DHCP/docker configuration settings in HAOS.

@Meatballs1
Copy link
Collaborator Author

Meatballs1 commented Apr 20, 2024

@Meatballs1
Copy link
Collaborator Author

Meatballs1 commented Apr 20, 2024

Potential workarounds:

  • ha-login.py adds .local or dns suffix to the hostnames
  • hcsocket catches exception and retries with .local?
  • container manages /etc/resolv.conf and removes the search whenever it loads/dhcp restarts?

@pmagyar
Copy link
Contributor

pmagyar commented May 1, 2024

I have done some research:

  1. i think mdns in HomeAssistant ist working. I have checked it with:
root@:~# ha dns info
fallback: true
host: 172.30.32.3
llmnr: true
locals:
- dns://192.168.178.1
mdns: true
servers: []
update_available: false
version: 2024.04.0
version_latest: 2024.04.0
  1. but only the fqdn ist working in the container:
root@4790c40a-hcpy:/app# host siemens-dishwasher
root@4790c40a-hcpy:/app# host siemens-dishwasher.fritz.box
siemens-dishwasher.fritz.box has address 192.168.178.28
root@4790c40a-hcpy:/app# host siemens-dishwasher.local
Host siemens-dishwasher.local not found: 2(SERVFAIL)
root@4790c40a-hcpy:/app#
  1. I looked at other addons. For example the MQTT Browser Addon https://github.com/GollumDom/addon-repository
    With this addon, i have the same issue. Only the ip or the fqdn works as Host....

  2. the issues that you found are interesting. I have found another one No SERVFAIL and no forwarding multicast names home-assistant/plugin-dns#86

I think currently it is not possible with homeassistant ( ... or i have a bug in my setup....).
Anyway, i think at first the workaround "ha-login.py adds .local or dns suffix to the hostnames" sounds good.
- Maybe we should create a parameter e.g. "--dns-tld" where everyone can add his own tld (?)

@Meatballs1
Copy link
Collaborator Author

Adding a domain suffix option would be a better workaround than manually changing the addresses I think

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