Name resolution problem since 0.97.2

Hi,

I’ve got a security camera configured in my Hass.io installation. It’s receiving the image from a Raspberry Pi with Motion running on it. It’s configured like this in HA:

camera:
  - platform: mjpeg
    mjpeg_url: !secret wozi_webcam_url
    still_image_url: !secret wozi_webcam_url_static
    name: Wohnzimmer Cam
    username: !secret archpi_motion_user
    password: !secret archpi_motion_pass
    verify_ssl: false

So far, this working fine and the camera Lovelace card in my HA installation was showing a picture or stream of the camera. Since the latest update to 0.97.2, this is not working anymore. It does not show a picture or stream and the log shows this all the time:

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]

The hostname wasn’t changed, and before, when I connect to the SSH container on my HA, it was able to resolve the hostname just fine. This is also failing now. Though, when I run a resolution via dig to my local DHCP/DNS server, the hostname is resolved:

$ dig +short @192.168.178.1 archpi.fritz.box
192.168.178.35

Was anything changed in the name resolution in HA with the latest update? Any idea on how to fix this?

Thanks!
Winni

I got problems too in the latest update. For some reason, all of a sudden, hassio stoped using my internal dns server and started using 8.8.8.8 and 1.1.1.1 (I think it was them). I had to manually set dns servers, restart hassio and wait some time for it to resolve. I set my own dns server in the command promt with command: “hassio dns update --servers dns://[ip-of-server]”. I hope this will help you :slight_smile:

Edit: I still have some problems… :frowning:

I think this update is the problem…

Hi Anders,

thanks for the help. Wasn’t aware of that change in the backend. I issued a

hassio dns options --servers dns://192.168.178.1

and “hassio dns info” now shows my internal DNS server, but it seems to haven’t helped. Let’s hope someone can fix this.

1 Like

Well it seems that it cached and I haven’t been able to fond a way to empty it. Wait a bit and maybe it will heal it self soon :slight_smile:

1 Like

I’m getting the same thing, 4 hours ago HassIO supervisor updated itself automatically. Looking at my PiHole setup I’m now no longer seeing DNS requests from my HassIO IP address, and I also have a new docker container:

hassio > login   
# docker ps
CONTAINER ID        IMAGE                                             COMMAND                  CREATED             STATUS              PORTS               NAMES
03cscsq65836        homeassistant/armhf-hassio-dns:1                  "coredns -conf /conf…"   4 hours ago         Up 4 hours                              hassio_dns
e8e86ee6c0b6        homeassistant/armhf-hassio-supervisor             "/bin/entry.sh pytho…"   4 hours ago         Up 4 hours                              hassos_supervisor
4a6780ee51c8        homeassistant/raspberrypi3-homeassistant:0.97.2   "/bin/entry.sh pytho…"   4 days ago          Up 3 hours                              homeassistant

docker exec homeassistant ping www.myblockeddomain.com
PING www.myblockeddomain.com (12.66.1.6): 56 data bytes

Also I’m now able to access www.myblockeddomain.com (example) from HA despite me blacklisting it in PiHole. Here’s my pihole graph:

Blue block was my HassIO IP. :frowning: I’ve tried your hassio dns info command and I get this error:

hassio > hassos info
board: rpi3
version: "2.12"
version_cli: dev
version_cli_latest: "12"
version_latest: "2.12"

hassio > hassio dns info
Error: unknown command "hassio" for "hassio"

Did you mean this?
	hassos

Run 'hassio --help' for usage.
FATA[0000] Error while executing rootCmd: unknown command "hassio" for "hassio"

Did you mean this?
	hassos 

Am I running the wrong version here?

Same problem here.
New docker container named hassio_dns appeared. Supervisor couldn’t start as google dns 8.8.8.8 is blocked by my router (so my chromecasts use my local dns server (pihole) to achieve loopback).
I managed to have hassio start again by using other dns server than pihole (which couldn’t start because supervisor container was down…)

Edit : same graph, pi-hole not used by hassio anymore :

This doesn’t affect me, but someone who is affected should post an issue on github.

Just did so: https://github.com/home-assistant/hassio/issues/1231

1 Like

Ok, I managed to get the hassio dns by installing the SSH addon.

Turns out if you login on port 22222 as detailed in the documentation you don’t have access to the hassio dns command.

I’ve corrected my DNS server, and rebooted the entire HassIO machine, and it seems to be using my PiHole DNS again now.

EDIT: @vasseurf what does having ‘loopback’ for chromecasts do? I’m intrigued!

Hi,
after this update I have problem starting supervisor:
[hassio.docker] Can’t start hassio_dns: 500 Server Error: Internal Server Error (“OCI runtime create failed: sysctl “kernel.domainname” is not in a separate kernel namespace: unknown”)

My docker VM is a Centos 7. Any idea ?

Regards
Alessandro

Didn’t know that the supervisor was updated automatically. Not very good. I have spent several hours troubleshooting dns in my docker containers until I noticed the new coredns container.
Can the autoupdate be disabled somehow?

2 Likes

What a mess, It took some time (hours) for me to understand that it was the new dns thing that hit my setup pretty big big time. I thought I had a corrupt disk (had some power failure yesterday…).

So for all that using your own dns server and blocks all outgoing dns request I think many will have problem. So over to github and see how we can change so we can configure our own dns 100% (adding hassio dns —option dns://xyz is as other said not a fully solution even). Using hardcoded dns is just so wrong, especially when we got this auto-magic :sunglasses:

Yeah, this addition broke a shit ton of my set-up (deCONZ, Unifi, Ping sensor, Glances, etc), and did it BY ITSELF without me updating. In fact I couldn’t even upgrade to 0.97.2 because it couldn’t find the update, or github, or anything else that needed name resolution.

What an awful idea or implementation (both?).

And even if it worked properly, the default DNS is hardcoded to a google domain and a Cloudflare domain. So much for privacy? I run my own DNS to NOT leak data to google where possible.

5 Likes

Didn’t know that the supervisor was updated automatically.

The HassIO supervisor always updates without asking, weather you like it or not. HassOS updates can be done manually however.

Can the autoupdate be disabled somehow?

Not easily, there’s no option to turn off auto updates.

I guess you could block updates on a network level somehow, I guess the reasoning behind it is HassIO is aimed at beginners therefore they should have updates automatically.

However I’d like the option to disable auto-update even if it’s turned on by default.

2 Likes

Update and break is the opposite of “aimed at beginners”.

4 Likes

I moved from Docker to hassio for all the amazing addons and ingress, but I have to say I really so far hate how the supervisor isolates the hass instances for using on box volumes and manages itself in general. I’m not sure I like the direction hass.io is going and I am debating going back to use containerizing my setup.

I have no idea how the made it into the stable build. It hardcodes 8.8.8.8 and 1.1.1.1 as the DNS servers, which breaks any local DNS resolution. There are a few solutions listed here.

If you’re running Hass.IO on Ubuntu, do the following:

vi /usr/share/hassio/dns/corefile

Change the DNS entries in there. Then do:

docker restart hassio_dns

And 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.

4 Likes

Change them to what?

The IP address of your local DNS server, e.g. 192.168.1.1.

1 Like