Suddenly HASS cannot connect to internet ressources (DNS issue?)

Hi,

starting from Saturday (I didn’t change the system, as I was not at home) HASS cannot connect to the internet: e.g. met.no weather forecast is not available, nor are telegram notifications.

Error ist:

Logger: metno
Source: /usr/local/lib/python3.8/site-packages/metno/__init__.py:105
First occurred: 21:03:03 (3 occurrences)
Last logged: 21:03:03
https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:default [Name does not resolve] 

I have a pretty default installation, as this is my backup/test system. Fresh install like 2 months ago, very little addons/integrations (e.g. NO PiHole, no DuckDNS, no LetEncrypt). Hardware is a NUC J5005.

I searched the internet and only found pretty old guides.

Any idea where to start?

When I ssh (community addon) into the Nuc, nslookup actually works for the URLs above. On the other hand, the HASS Container seems not to be able to connect to the outside world. Installed using the official NUC image. System and supervisor are up to date.

(And yes, I did reboot the whole box)

I am following this, because I have similar issues preventing me from even installing HA.

Update to 0.117.1 did not fix the issue. What information do we miss providing you?

Googled for 2h and found a dozen similiar topics, but no real help. Seems weird.

If I ssh into ha cli, and run ha dns info:

~ $ ha dns info
host: 172.30.32.3
locals:
- dns://192.168.1.1
servers: []
update_available: false
version: 2020.10.2
version_latest: 2020.10.2
~ $ host google.com
google.com has address 216.58.212.142
google.com has IPv6 address 2a00:1450:4001:801::200e
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
~ $ ha dns log
[INFO] 172.30.32.1:46830 - 29713 "A IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 66 0.000332892s
[INFO] 172.30.32.1:50555 - 40056 "A IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 66 0.000145603s
[INFO] 172.30.32.1:50555 - 40849 "AAAA IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 78 0.000139074s
[INFO] 172.30.32.1:38740 - 21447 "A IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 66 0.000060566s
[INFO] 172.30.32.1:38740 - 21752 "AAAA IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 78 0.00006291s
[INFO] 172.30.32.1:33929 - 28119 "A IN api.telegram.org. udp 34 false 512" NOERROR qr 66 0.002507076s
[INFO] 172.30.32.1:33929 - 28373 "AAAA IN api.telegram.org. udp 34 false 512" NOERROR qr 78 0.003318926s
[INFO] 172.30.32.1:57468 - 51474 "AAAA IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 78 0.000066505s
[INFO] 172.30.32.1:57468 - 51227 "A IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 66 0.000107803s
[INFO] 172.30.32.1:33982 - 36199 "AAAA IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 78 0.00005481s
[INFO] 172.30.32.1:33982 - 35958 "A IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 66 0.000160642s
[INFO] 172.30.32.1:38481 - 64614 "AAAA IN api.telegram.org. udp 34 false 512" NOERROR qr,aa,rd 78 0.000050388s

On the other hand I have tons of error that telegram.org (oder met.no or xyz.abc) cannot be solved:




Logger: telegram.ext.updater
Source: /usr/local/lib/python3.8/site-packages/telegram/ext/updater.py:332
First occurred: 31. Oktober 2020, 16:13:01 (4835 occurrences)
Last logged: 15:40:11

    Error while getting Updates: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot1282399924:AAFQh7Fh3cciHNjHU3atz0TLL-pFfFRo1AE/getUpdates (Caused by NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f583211c0a0>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
    Error while getting Updates: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot1282399924:AAFQh7Fh3cciHNjHU3atz0TLL-pFfFRo1AE/getUpdates (Caused by NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5832138b50>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
    Error while getting Updates: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot1282399924:AAFQh7Fh3cciHNjHU3atz0TLL-pFfFRo1AE/getUpdates (Caused by NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f583256f6a0>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
    Error while getting Updates: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot1282399924:AAFQh7Fh3cciHNjHU3atz0TLL-pFfFRo1AE/getUpdates (Caused by NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5831c06790>: Failed to establish a new connection: [Errno -2] Name does not resolve'))
    Error while getting Updates: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot1282399924:AAFQh7Fh3cciHNjHU3atz0TLL-pFfFRo1AE/getUpdates (Caused by NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f583211cbe0>: Failed to establish a new connection: [Errno -2] Name does not resolve'))



Logger: metno
Source: /usr/local/lib/python3.8/site-packages/metno/__init__.py:105
First occurred: 31. Oktober 2020, 16:12:51 (23 occurrences)
Last logged: 14:49:51
https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:default [Name does not resolve] 

I REALLY want to like Home Assistant. I’d like to use it with homebridge and my broadlink rm pro. I first installed the homebridge image on a pi 3b 32 bit and it booted fine…got it setup. I then followed a tutorial on how to install home assistant on raspian from here: https://siytek.com/install-home-assistant-on-raspbian/ I got to where it’s supposed to be doing it’s first boot of home assistant and saw a screenful of errors about not being able to configure person, overlay and a bunch of others. Attempting a 2nd run after ctrl-c got identical results. It never even showed the please wait web page.

I then took the appropriate home assistant image for the 3b 32 bit and installed it then booted the pi…it grabbed an ip address and was doing a file download for quite a while…it showed the “please wait” webpage…hey progress…it got to a part that looked like it was rebooting and I think it was related to dns and it never came back…didn’t even grab an ip…so I unplugged it and let it restart…hey it grabbed the same ip again,and that’s all it does. I never even see the please wait screen from before.

As I said, I want to like it but I’m not real impressed when the provided image won’t even boot the app up. I am so not feeling the love.

Having similar DNS issues for the last week or so.

Currently running:
Supervisor - 2020.10.0
HassOS - 4.15
Core - 0.117.1

Most recent example is below for a failed app notification. Strangely it seems to only be some app noifications. Others still work fine. Multiple host and core restarts seems to resolve the problem for particular symptoms but then other DNS errors are logged for other things.

Cannot connect to host mobile-apps.home-assistant.io:443 ssl:default [Name does not resolve]

Another example:

Error fetching version information from Hassio, Cannot connect to host version.home-assistant.io:443 ssl:default [Connect call failed ('2606:4700:20::ac43:445a', 443, 0, 0)]

Something changed with how SSL requests are made recently maybe?
Don’t seem to be experiencing DNS issues with other devices on the network.

1 Like

My issue was related to io errors on the microsd card and not a HA issue. I went into more detail here: DNS stopped working

Hope you folks get your issue fixed too!

Good to hear for you.

Unfortunatelly my setup is still broken. I actually wanted to use HA in my new build home and I am currently testing a bit while waiting for the constructions to finish. However, these kinds of error (just appear out of nowhere) and the lack of online ressources / support makes me think twice :pleading_face:

Guys, am I doing something wrong? The HASS community is described as very active and helpful all over the internet. And I am just sitting here, with a unusable setup, and no clue how to continue?

Just managed to resolve or work around the issue for my setup.

Like your issue, my DNS log was showing no errors but HA was logging [Name does not resolve] errors inconsistently.

Also like your setup, DNS only had my router under locals: and nothing under servers:.
Adding Google DNS stopped the errors for me (or any other external DNS).

ha dns options --servers dns://8.8.8.8
ha dns restart

Unfortunately doesn’t explain why DNS was only being resolved in HA some of the time when from my router with no HA DNS errors or why the problem has only recently started happening.

3 Likes

THIS WORKS!

Thanks @scotty1395 you saved me from a lot of work.

Still strange, that this does not work as expected.

Fixed it for me too! Thanks @scotty1395