I know this isn’t the first post on DNS, sorry I couldn’t find the answer
Since I’ve reinstalled hass.io I’m having troubles connecting to external services, due to naming resolution issues. After reading all the other posts I’ve tried to find the cause of the issue, but I’m not able to see why the hassio_supervisor isn’t resolving the DNS for the homeassistant container.
Any help is MUCH appreciated
HOST MACHINE
user@HASS:~$ nslookup google.com
Server: 10.0.1.1
Address: 10.0.1.1#53
Non-authoritative answer:
Name: google.com
Address: 172.217.20.110
HASS IO SUPERVISOR
sudo docker container exec -ti hassio_supervisor /bin/bash
bash-4.4# cat /etc/resolv.conf
nameserver 127.0.0.11
options ndots:0
nslookup: can't resolve '(null)': Name does not resolve
Name: google.com
Address 1: 172.217.20.110 fra02s28-in-f14.1e100.net
Address 2: 2a00:1450:400e:80b::200e ams17s01-in-x0e.1e100.net
bash-4.4#
bash-4.4# nslookup google.com 172.30.32.2
Server: 172.30.32.2
Address 1: 172.30.32.2 e2a6fd2da52f
Name: google.com
Address 1: 172.217.20.110 fra02s28-in-f14.1e100.net
Address 2: 2a00:1450:400e:80b::200e ams17s01-in-x0e.1e100.net
HOMEASSISTANT
sudo docker container exec -ti homeassistant /bin/bash
bash-4.4# cat /etc/resolv.conf
nameserver 172.30.32.2
options ndots:0
bash-4.4# nslookup google.com
nslookup: can't resolve '(null)': Name does not resolve
nslookup: can't resolve 'google.com': Try again
1 Like
Danymyte
(Danymyte)
July 28, 2018, 11:18am
2
I do have exactly the same issue since a couple of days.
Tried to reinstall host system (ubuntu 16.04.5 LTS) and hassio - problem remains.
Is there anybody who could guide us in this matter?
I found that if I run socat
manually on the hassio_supervisor
DNS actually works.
Not sure why it doesn’t autostart (or how I can make that happen)
sudo docker exec -d hassio_supervisor socat UDP-RECVFROM:53,fork UDP-SENDTO:127.0.0.11:53
1 Like
lubeda
(LuBeDa)
October 25, 2018, 6:50pm
4
Same problem here i think a lot of people are suffering from this issue.
Klagio
(Klagio)
November 3, 2018, 11:08am
5
upgraded to 0.81.4 and seems I have this issue, any clue?
Hi are you running HassIO on a raspberry pi or VM? Can you ping server.local
machines from within a container after running socat
manually?
bigboban
(Petr Leitner)
November 6, 2018, 7:59am
7
Same problem. I have hassio i docker(s) on Ubuntu 16. Hassio dns resolve ok, but home-assistant container not. After applying command from IngmarVerheij it is now fixed.
I also tried edit resolv.conf on homeassistant docker and set 8.8.8.8. It also worked but after HA restart it was broken again.
I have the same problem any movement on this issue?
taste
(Marc)
January 14, 2019, 8:13pm
10
Same issue but only in the appdaemon container. Did anybody found a persistent solution yet? pruning and reinstalling appdaemon does not help
taste
(Marc)
January 14, 2019, 8:31pm
11
RoadkillUK
(Roadkill Uk)
January 14, 2019, 8:44pm
12
I’m having DNS issues on my HASSIO installation, it’s driving me mad, any solution for it?
taste
(Marc)
January 14, 2019, 8:47pm
13
RoadkillUK
(Roadkill Uk)
January 14, 2019, 8:56pm
14
@taste
I’ll be honest, i know little about linux.
I have ssh to my pi, I can get to the folder etc but there is no docker in there (that I can tell), don’t know if I should make a directory, but I tried and failed anyway
Thanks all the same
taste
(Marc)
January 14, 2019, 9:02pm
15
This should do it if you are running plain docker on your Pi.
If you are in your PI via ssh type:
sudo nano /etc/docker/daemon.json
This should open the nano editor with an empty file.
copy this in this file:
{
“dns”: [“192.168.25.25”, “8.8.8.8”, “8.8.4.4”]
}
update 192.168.25.25 with your local DNS server mostly your internet router IP address
press ctrl-X and save the file
Type: sudo service docker restart
Wait some minutes and see if your homeassitant comes back alive
If you run hassio on the PI this is not meant for you
RoadkillUK
(Roadkill Uk)
January 14, 2019, 9:08pm
16
I appreciate the time and effort put into helping.
I tried what you said, but sudo didn’t work so I dropped it. I edited the file and tried to save it, however I got this message …
[ Error writing /etc/docker/daemon.json: No such file or directory ]
I don’t think the directory etc/docker exists.
Thanks, anyway.
tmcarr
(Travis M Carr)
January 14, 2019, 9:27pm
17
It says it doesn’t exist because you dropped sudo. The program does not have permission to see it.
Add sudo back in, when it asks for a password enter the root password you set and then continue as they wrote.
RoadkillUK
(Roadkill Uk)
January 14, 2019, 9:36pm
18
It doesn’t like sudo, thanks
core-ssh:/# sudo nano /etc/docker/daemon.json
-bash: sudo: command not found
core-ssh:/#
lordsiris
(Chris)
January 14, 2019, 9:38pm
19
I had the same issue some time last week in regards to the docker image. I deleted the docker and recreated it (I have persistent data setup) and that seemed to have corrected the issue, for me at least.
RoadkillUK
(Roadkill Uk)
January 14, 2019, 11:38pm
20
OK, fixed the bugger (hopefully)
Took a snapshot, backed it up.
Reinstalled the damn thing using a USB stick with network configs on.
Put the snapshot back on, had a bit of trouble with mariadb, but I reinstalled that and so far, so good.
Thanks all