Strange "Cannot connect to host" issue

I have I really strange network issue i haven’t been able to figure out. Hassio won’t no longer connect to any external services like Yr (Weather), IFTTT or Telegram. I just get “Cannot connect to host” error messages in my log when it tries to connect to those.

Normally I would think this was because Hassio had lost the Internet connection or a firewall is blocking something. But I’m able to do the following things which should not be possible if that was the case:

  • I am able to log into hassio over ssh and ping hosts on the Internet. This works fine even on the services I try to use like, and (Yr).
  • I’m also able to trigger IFTTT webhooks using Curl when logged in over ssh. Even when using https.

If the Hassio-box have no trouble connecting to those services when in command line, what else could be causing the issue? I’m a bit lost how to troubleshoot this issue further, so any help would be appreciated.

Some details about the setup:

  • Raspberry pi 3 with Hassio.
  • Connected to two separate home networks. Primary connection (Internet + primary lan) through ethernet and secondary connection (secondary lan used for device detection) through WiFi.

Same problem here with Hassio 0.60.1

Did you find any solution ?

Same here. Also happened after I updated HA to 0.60.1
So yeah, I’m also interested in an easy solution without being forced to start from scratch again.

– edit:
My guess is that this could have been caused by updating hassio to 0.81 since there is this comment in the release notes:

Fix possible problems with internal dns resolver

I have reported bug on Github :

Maybe a possible fix could be to disable ipv6 support for the local network (idea from here: PR). I’m not at home right now but will give it a try later today.

Yep maybe related to this commit

In my case it just started to work by itself after about a week or so. I didn’t do any changes, that to my knowledge should have fixed the issue, but I just noticed suddenly that the weather service worked again. So I don’t have any useful fixes to add. But it sounds reasonable that it could be an issue related to dns.

Can you try to switch to ipv4 only? would love to know if this workaround fixes the issue :slight_smile:

– edit:
Tried it myself. Does not change a thing.

Is there a way to easily update -by terminal- to see if the new release fixes the issue?
I do not feel much for installing the Hassio image again.

Everything is working fine though. But I cannot update, see weather of configure Nest with this error.

For me it was working again after updating HA to 0.61.1

Normally you don’t have to update using terminal. Just take a snapshot to save your current configuration, install the update via the hassio tab in web UI (/hassio/dashboard) and see if that fixes it. If things go wrong you can still apply your saved snapshot.

I managed to update by command line but it isn’t fixed.

0.61.1 did not fix this “connect to host” issue on my side :frowning:

It’s tough to tell which exact step solved it for me in the end. Some possibilities are:

  • I uninstalled the Pi-Hole addon on the raspberry running hassio and set it up on another Pi zero
  • I did a hassio snapshot from my old SD card (8GB), did a fresh hassio install on another card (32GB) and imported the snapshot again
  • I set up HTTPS encryption

No pi-hole and already https encrypted on my side…

Maybe I will take time to snapshot and do a fresh instal…

Just to update according to

Problem is on docker side. Use a static IP or send Google DNS through your DHCP solves the problem.