Home Assistant won't start after internet drop out

Tags: #<Tag:0x00007f7399c28148>

Hi, so yesterday my internet dropped out and now my home assistant isn’t working. Using hassio with a duckdns on a RB4. Everytime I visit mydomain.duckdns.org I get a site can’t be reached error.

I can still reach the files via samba and i’ve checked the IP of the RB4 and it’s still the same. Tho I suspect the fault has to be with the IP?

Looking in the long logs I can’t find any relevant info.

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 830, in _resolve_host
    self._resolver.resolve(host, port, family=self._family)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/resolver.py", line 30, in resolve
    host, port, type=socket.SOCK_STREAM, family=family)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 792, in getaddrinfo
    None, getaddr_func, host, port, family, type, proto, flags)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again
2020-08-02 12:26:59 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved

Am havin the exact same issues, but then on a NUC running hassio supervised on Ubuntu. It looks as if an internet hiccup will cause Homeassistant to crash the host. I have no stability issues aside from this issue.

I haven’t investigated much further as internet problems are rare at where I live, but it is annoying (especially since the last crash happened when I was abroad)

What is an RB4?
have you tried rebooting the device that Home Assistant is running on?

Probably a Raspberry Pi 4 :slight_smile:

Sometimes I have the same problem. The issue for me is that duckDNS does not update the correct IP Address given by my ISP after the router reboots. Check your IP address using ip2location.com and compare it with the setting on duckdns

Thanks Francisp. It’s a Raspberry Pi 4.

I’ve tried rebooting it but it doesn’t change anything.

How can i check my duckdns settings? Is it possible via samba or do i need to hook up my raspberry to external monitor? Thanks!

It is a two way work :
first you open a command prompt, and issue the command

nslookup mydomain.duckdns.org

Don’t forget to replace mydomain with your real duckdns name !


then you go to iplocation.com

The 2 ip-addresses should be the same.

Thanks. Just checked both IPs and looks like they are the sames so maybe the error doesn’t stem from Duckdns?

Can you reach HA using your internal IP-address ?

I feel so stupid that I didn’t try reaching it internal. I can reach the HA with my internal IP-address.

Should I update duckdns?

The external IP address of your router, the IP address that’s shown at yourdomain.duckdns.org, and the IP address when you go to ip2location.com must be the same. If it is not, then you can update the IP address at yourdomain.duckdns.org

This has happened to me on numerous occasions. I’m guessing your public IP is changed when the internet drops out (router restarts), which is updated with DuckDNS but stops external access. It doesn’t seem to affect everyone but the fix for me is to turn power off to router and the RPi > Power on the router and let it connect to internet > power on RPi.

Worth a go and if you do find the underlying cause, I’d be grateful to know :+1:

Yes, usually updating duckdns solves the problem for me.