DNS Issues in Homeassistant OS

I do not quite understand how the DNS-Setup is supposed to work.

  • Updates work
  • Integrations with need for internet-access have issues
  • DNS in the console only works if i mod /etc/resolv.conf
#normal lookup from cli fails
[core-ssh ~]$ nslookup get.hacs.xyz
;; connection timed out; no servers could be reached

#if i specify 1.1.1.1 or my own dns it works
[core-ssh ~]$ nslookup get.hacs.xyz 1.1.1.1
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
Name:   get.hacs.xyz
Address: 104.21.39.42
Name:   get.hacs.xyz
Address: 172.67.143.44
Name:   get.hacs.xyz
Address: 2606:4700:3031::ac43:8f2c
Name:   get.hacs.xyz
Address: 2606:4700:3034::6815:272a

#weird ip pointing to the same server in resolv.conf
[core-ssh ~]$ cat /etc/resolv.conf
search local.hass.io
nameserver 127.0.0.11
options ndots:0

#no idea what this is supposed to do
[core-ssh ~]$ ha dns info
fallback: false
host: 172.30.32.3
llmnr: true
locals:
- dns://1.1.1.1
mdns: true
servers:
- dns://the.dns.i.actually.want.to.use
update_available: false
version: 2022.04.1
version_latest: 2022.04.1

radio browser broken:

Logger: homeassistant.config_entries
Source: components/radio_browser/__init__.py:25
First occurred: 10:30:44 AM (1 occurrences)
Last logged: 10:30:44 AM
Error setting up entry Radio Browser for radio_browser

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/radio_browser/__init__.py", line 25, in async_setup_entry
    await radios.stats()
  File "/usr/local/lib/python3.10/site-packages/radios/radio_browser.py", line 124, in stats
    response = await self._request("stats")
  File "/usr/local/lib/python3.10/site-packages/backoff/_async.py", line 151, in retry
    ret = await target(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/radios/radio_browser.py", line 73, in _request
    result = await resolver.query("_api._tcp.radio-browser.info", "SRV")
aiodns.error.DNSError: (11, 'Could not contact DNS servers')

dwd can’t seem to contact its source

 Logger: homeassistant.components.sensor
Source: runner.py:179
Integration: Sensor (documentation, issues)
First occurred: 10:30:51 AM (1 occurrences)
Last logged: 10:30:51 AM
Setup of sensor platform dwd_weather_warnings is taking over 10 seconds.

i tried switching from dhcp to static with 1.1.1.1 in gui network conf already. that did not help

please tell me how this system is supposed to be set up :smiley:

2 Likes

which kind of installation you running: Hasos, Docker or supervised ?
i ask because i run into the same problems the last days of configuration-attempts.
only Docker works for me without issues, the rest generating the same error as you get.

Home Assistant OS 10.0 from Github:
haos_rpi4-64-10.0.rc3.img + updates

i actually have the same installed on a RPI4 and an new ODROID m1 (with the actual supported image) - get the same issues as you described and followed the mostly loose ends on this forum so far with “DNS related” issues.

With the hasos release you can alter the dns settings via the ha dns commands a bit - you you did already it works for the HOST if you set a server manually but the process in homeassistant uses the internal hassio_dns container in docker which seems not working but insights are limited.

You can check if there is a entry on your supervisor logs which states dbus (systemd_resolved) can not be started and somewhere in the logs is than a “running on a unsupported os version”. so far the most suggestions came up with check dns settings in the internal network and restart or reinstall. (so far for me no suggestions work). on hasos you can also not alter the systemd_resolved service.

if you not need the addon section for HA you can try a docker install.

setting my dns configuration and restarting the system works actually for me.

[core-ssh ~]$ ha dns info
fallback: true
host: 172.30.32.3
llmnr: true
locals:
- dns://192.168.xx.x
mdns: true
servers:
- dns://8.8.8.8
- dns://1.1.1.1
update_available: false
version: 2022.04.1
version_latest: 2022.04.1
[core-ssh ~]$

set it with the ha dns:
ha dns reset
ha dns options --servers dns://8.8.8.8 --servers dns://1.1.1.1
ha dns restart

and rebooted the system.

than a dig command works:


[core-ssh ~]$ dig _checkdns.home-assistant.io AAAA +noall +comments
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53872
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 5d2e1da190e037f7 (echoed)
[core-ssh ~]$

before that the mdns flag was set to false, which prevents the process to resolve the names.

give it a try.

btw: on my internal network settings dns or other thing, i changed of course absolute nothing.

1 Like

Hey, thanks for all your input

[core-ssh ~]$ ha dns info
fallback: true
host: 172.30.32.3
llmnr: true
locals:
- dns://192.168.xxx.xxx
mdns: true
servers:
- dns://8.8.8.8
- dns://1.1.1.1
update_available: false
version: 2022.04.1
version_latest: 2022.04.1

did a reboot too but the problem still persists… :frowning:

[core-ssh ~]$ nslookup get.hacs.xyz
;; connection timed out; no servers could be reached


[core-ssh ~]$ nslookup get.hacs.xyz 192.168.xxx.xxx
Server:         192.168.xxx.xxx
Address:        192.168.xxx.xxx#53

Non-authoritative answer:
Name:   get.hacs.xyz
Address: 104.21.39.42
Name:   get.hacs.xyz
Address: 172.67.143.44
Name:   get.hacs.xyz
Address: 2606:4700:3031::ac43:8f2c
Name:   get.hacs.xyz
Address: 2606:4700:3034::6815:272a

Did someone actually fixed this? I just installed home assistant for the first time, and the DNS does not work. I’ve seen other posts and everyone comes to the conclusion that “this is how the OS works and if you don’t like it, use a docker install” which seems ridiculous. I have bought a inuc only to run home assistant, I’ll do whatever to configure it, but I just want it to… you know… work. How are we supposed to setup the DNS?

Try this from Terminal: echo nameserver 8.8.8.8 > /etc/resolv.conf

YOU ARE MY HERO!!! I’ve been fighting an issue with this for days now…and I just found your suggestion and poof! HACS installed!

2 Likes

well i guess i spoke too soon…now its giving me an error saying could not authenticate with github

1 Like

Ive got the same issue did you manage to solve this ?

Same Issue here. Someone has Idear. I can ping github. but with no succsess
2023-11-13 20_48_59-Window

I am using docker and can’t find the ha executable. Do you know how I can accomplish this on the docker install?