supervisor: Name resolution problem since 0.97.2
Home Assistant release with the issue: 0.97.2
Operating environment (HassOS/Generic): HASS.io running on Raspberry PI 3B
arch: armv7
channel: stable
hassos: null
homeassistant: 0.97.2
hostname: null
logging: info
machine: raspberrypi3
supervisor: "179"
supported_arch:
- armv7
- armhf
timezone: Europe/Berlin
Supervisor logs:
19-08-16 20:38:15 INFO (MainThread) [__main__] Initialize Hass.io setup
19-08-16 20:38:15 INFO (SyncWorker_0) [hassio.docker.supervisor] Attach to Supervisor homeassistant/armhf-hassio-supervisor with version 179
19-08-16 20:38:15 INFO (SyncWorker_0) [hassio.docker.supervisor] Connect Supervisor to Hass.io Network
19-08-16 20:38:17 INFO (SyncWorker_0) [hassio.docker.interface] Cleanup images: ['homeassistant/armhf-hassio-supervisor:178']
19-08-16 20:38:18 INFO (MainThread) [__main__] Setup HassIO
19-08-16 20:38:18 INFO (SyncWorker_2) [hassio.docker.interface] Attach to homeassistant/armhf-hassio-dns with version 1
19-08-16 20:38:18 INFO (MainThread) [hassio.dns] Update resolv from Supervisor
19-08-16 20:38:18 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.systemd1 on /org/freedesktop/systemd1
19-08-16 20:38:18 INFO (MainThread) [hassio.misc.forwarder] Start DNS port forwarding to 172.30.32.3
19-08-16 20:38:18 ERROR (MainThread) [hassio.utils.gdbus] DBus return error: b'Error connecting: Could not connect: No such file or directory\n'
19-08-16 20:38:18 WARNING (MainThread) [hassio.dbus.systemd] Can't connect to systemd
19-08-16 20:38:18 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.hostname1 on /org/freedesktop/hostname1
19-08-16 20:38:18 ERROR (MainThread) [hassio.utils.gdbus] DBus return error: b'Error connecting: Could not connect: No such file or directory\n'
19-08-16 20:38:18 WARNING (MainThread) [hassio.dbus.hostname] Can't connect to hostname
19-08-16 20:38:18 INFO (MainThread) [hassio.utils.gdbus] Introspect de.pengutronix.rauc on /
19-08-16 20:38:18 ERROR (MainThread) [hassio.utils.gdbus] DBus return error: b'Error connecting: Could not connect: No such file or directory\n'
19-08-16 20:38:18 WARNING (MainThread) [hassio.dbus.rauc] Can't connect to rauc
19-08-16 20:38:18 INFO (MainThread) [hassio.host.apparmor] Load AppArmor Profiles: {'hassio-supervisor'}
19-08-16 20:38:18 INFO (MainThread) [hassio.host.apparmor] AppArmor is not enabled on host
19-08-16 20:38:18 INFO (SyncWorker_2) [hassio.docker.interface] Attach to homeassistant/raspberrypi3-homeassistant with version 0.97.2
19-08-16 20:38:19 INFO (MainThread) [hassio.store.git] Load add-on /data/addons/git/cebe7a76 repository
19-08-16 20:38:19 INFO (MainThread) [hassio.store.git] Load add-on /data/addons/git/a0d7b954 repository
19-08-16 20:38:19 INFO (MainThread) [hassio.store.git] Load add-on /data/addons/core repository
19-08-16 20:38:20 INFO (MainThread) [hassio.store] Load add-ons from store: 60 all - 60 new - 0 remove
19-08-16 20:38:20 INFO (MainThread) [hassio.addons] Found 10 installed add-ons
19-08-16 20:38:20 INFO (SyncWorker_5) [hassio.docker.interface] Attach to homeassistant/armv7-addon-ssh with version 6.2
19-08-16 20:38:20 INFO (SyncWorker_6) [hassio.docker.interface] Attach to hassioaddons/grafana-armv7 with version v2.2.3
19-08-16 20:38:20 INFO (SyncWorker_0) [hassio.docker.interface] Attach to sabeechen/hassio-google-drive-backup-armv7 with version 0.98.2
19-08-16 20:38:20 INFO (SyncWorker_13) [hassio.docker.interface] Attach to hassioaddons/influxdb-armv7 with version v3.1.2
19-08-16 20:38:20 INFO (SyncWorker_8) [hassio.docker.interface] Attach to homeassistant/armv7-addon-mosquitto with version 5.0
19-08-16 20:38:20 INFO (SyncWorker_7) [hassio.docker.interface] Attach to homeassistant/armv7-addon-duckdns with version 1.9
19-08-16 20:38:20 INFO (SyncWorker_3) [hassio.docker.interface] Attach to homeassistant/armv7-addon-git_pull with version 7.4
19-08-16 20:38:20 INFO (SyncWorker_0) [hassio.docker.interface] Attach to homeassistant/armhf-addon-bluetooth_bcm43xx with version 2.3
19-08-16 20:38:20 INFO (SyncWorker_10) [hassio.docker.interface] Attach to homeassistant/armv7-addon-check_config with version 2.2
19-08-16 20:38:20 INFO (SyncWorker_5) [hassio.docker.interface] Attach to homeassistant/armhf-addon-deconz with version 3.1
19-08-16 20:38:20 INFO (MainThread) [hassio.updater] Fetch update data from https://version.home-assistant.io/stable.json
19-08-16 20:38:20 INFO (MainThread) [hassio.snapshots] Found 10 snapshot files
19-08-16 20:38:20 INFO (MainThread) [hassio.discovery] Load 2 messages
19-08-16 20:38:20 INFO (MainThread) [hassio.ingress] Load 2 ingress session
19-08-16 20:38:20 INFO (MainThread) [__main__] Run Hass.io
19-08-16 20:38:20 INFO (MainThread) [hassio.api] Start API on 172.30.32.2
19-08-16 20:38:20 INFO (MainThread) [hassio.addons] Phase 'initialize' start 1 add-ons
19-08-16 20:38:21 INFO (SyncWorker_19) [hassio.docker.interface] Clean addon_core_bluetooth_bcm43xx application
19-08-16 20:38:29 INFO (SyncWorker_19) [hassio.docker.addon] Start Docker add-on homeassistant/armhf-addon-bluetooth_bcm43xx with version 2.3
19-08-16 20:38:30 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-08-16 20:38:34 INFO (MainThread) [hassio.core] Hass.io reboot detected
19-08-16 20:38:34 INFO (MainThread) [hassio.tasks] All core tasks are scheduled
19-08-16 20:38:34 INFO (MainThread) [hassio.core] Hass.io is up and running
19-08-16 20:38:58 INFO (MainThread) [hassio.api.security] /homeassistant/restart access from core_ssh
19-08-16 20:38:58 INFO (SyncWorker_13) [hassio.docker.interface] Restart homeassistant/raspberrypi3-homeassistant
19-08-16 20:39:00 ERROR (MainThread) [hassio.homeassistant] Error on call https://172.30.32.1:8123/api/states/binary_sensor.snapshots_stale: Cannot connect to host 172.30.32.1:8123 ssl:None [Connection refused]
19-08-16 20:39:00 ERROR (MainThread) [hassio.api.proxy] Error on API for request states/binary_sensor.snapshots_stale
19-08-16 20:39:26 ERROR (MainThread) [hassio.homeassistant] Error on call https://172.30.32.1:8123/api/states/binary_sensor.snapshots_stale: Cannot connect to host 172.30.32.1:8123 ssl:None [Connection refused]
19-08-16 20:39:26 ERROR (MainThread) [hassio.api.proxy] Error on API for request states/binary_sensor.snapshots_stale
19-08-16 20:39:46 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance
19-08-16 20:40:15 INFO (MainThread) [hassio.api.security] /dns/logs access from core_ssh
19-08-16 20:41:17 INFO (MainThread) [hassio.api.security] /supervisor/logs access from core_ssh
Description of problem: See this thread in the forum: https://community.home-assistant.io/t/name-resolution-problem-since-0-97-2/132201
Looks like several people have issues with the HASS internal DNS system. Even after updating the DNS server to my local router, the internal name resolution in HASS still fails.
hassio dns options --servers dns://192.168.178.1
ERROR (MainThread) [homeassistant.components.mjpeg.camera] Error getting new camera image: Cannot connect to host archpi.fritz.box:8081 ssl:None [Name does not resolve]
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 15
- Comments: 105 (19 by maintainers)
Re-opening / unlocking.
ℹ️ Supervisor 180 has been released
This release addresses a couple of issues & comments:
localhostshould now work, independent of add-on state.ℹ️ All add-ons providing the
hassioCLI have been updated with CLI v3.1.0This version of the CLI adds the
hassio dns restartcommand, connecting to the restarting endpoint added in Supervisor 180.ℹ️ Setting your own DNS server
This requires both supervisor 180 and the latest add-ons with CLI v3.1.0
hassio dns options --servers dns://IP_ADDRESShassio dns restartThank you all for the feedback, sorry for the trouble 👍
Be fair. This is an open source project and most users will probably not even notice this change. This might be a “major breakdown” for you, but not generally for the whole HA community. It’s a friday night… give them a chance to look at it. I mean in the end you can still revert to an older snapshot (if you have one). You probably got lots of great shit from this project - for free… that also brings with it, that you don’t have a “3 business hours support” contract. I’m pretty sure, the fact that this has 18 comments already will point the DEVs to this bug and that there will be a fix soon. Just don’t expect it in like 5 minutes after an issue is filed.
@frenck, on behalf of us all, thank you very much for your efforts and quick response on this issue.
7 hours on a major breakage and no developers?
FYI for those running Hass.IO on Ubuntu:
vi /usr/share/hassio/dns/corefileChange the DNS entries in there. Then do:
docker restart hassio_dnsAnd then restart HA from the UI. It should come back but will likely be overwritten if the container updates without this being corrected. Thanks to the instructions above for the pointer.
This just nuked the majority of my local devices connected to Home Assistant. It will not resolve anything using a local DNS name, e.g. nodemcu.mynetwork.local. I understand mistakes happen, but this was a horrible idea and implementation.
Ugh. Please put this back. It is breaking my PiHole/local dns.
A future change on that backend is, that we can read the host DNS settings over dbus from NetworkManager and add the local DNS as first server with fallback to others.
But why is it ignoring dns servers pushed by DHCP in the first place?
Why is the hassio-supervisor automatically upgraded? I did not request the update to version 181, now my whole system is junk. Half the pages don’t work, system is now super slow. Please ask before auto upgrading. Once again…this is the kind of stuff that made me leave OpenHAB behind and now it seems HA is going to do that same types of things.
Shouldn’t be necessary on a properly configured network. All my devices respond to hostname only from a command line apart from within HA.
Initially received a 502 gateway error upon manual attempt to update supervisor via webUI. Rebooted host for good measure and observed update occurred without further intervention. Local name resolution working consistently and as expected since specified name servers are honored sequentially and not randomly.
Thanks for resolving this issue!
I fixed my issue by adding the following automation:
and by adding the following code to configuration.yaml:
I’ve locked further comments on this issue right now. A lot of comments have been made, solutions (workarounds) offered. We are aware and working on it. Thanks all for participating 👍
IMHO, the general theme from most people here is:
Seriously I spent several hours trying to figure out what happened. I never even updated hassio and still somehow got the update. Please fix this.
Yeah I assumed that it will be overwritten, its more meant as a temporary a work around. I hope that this gets fixed rather soon.
This is poor behaviour. hassio should honour the DHCP delivered DNS server.
The only search domain (‘search’ in /etc/resolv.conf) defined is
local.hass.io. If the host you’re trying to reach is in a different domain, then specifying the FQDN is needed. I’m not certain if this has always been practice (as far as the resolver setup in home-assistant is concerned), but I use FQDNs in practice and not PQDN or simple hostnames, therefore I would not have noticed an issue (in my setup). This issue seems only peripherally connected to what caused this issue’s creation to begin with.It is curious however that manually adding another domain to
/etc/resolv.confstill results inHost hostname.local.hass.io not found: 2(SERVFAIL)and doesn’t seem to be traversing the list of search domains.You have rebooted hassio or restarted the dns? and your are on Hypervisor >=181? what is your local prefix? hassio dns info returns? have you tried from the ssh-addon >host xxx.yyy your_router_or_dns_ip
Thanks for the update. Please consider not adding quad9 and cloudflare to the DNS list if we don’t specify them. I understand local DNS is preferred, but after this issue I’ve blocked access on my firewall as my HA is as good as broken without access to my local DNS server.
All I can say is that even though it doesn’t fix resolution from containers it DOES fix esphome devices if you follow the instructions to set the dns using the hassio cli and then restarting the host.
For me that’s a significant win and I can now wait for a more comprehensive solution.
@frenck
Ha, I somehow never noticed the option for a terminal in VSS. Thanks.
@NearlCrews
The Hass.io CLI is available in the SSH, SSH & Web Terminal, Visual Studio Code and IDE add-ons.
+1 This is awful. I just came across this issue after spending the better part of the last few hours troubleshooting every level of my infrastructure. Please fix / revert. Supplying internal DNS via
hassio dnsand then rebooting the node does not result in a fix and DNS resolution is intermittent at best.Editing
hassio/dns/corefilemanually, deleting the superfluous servers and restart usingdocker restart hassio_dnssolves the issue here, at least for now.