No access from HassIO inside-out

Hi!

Since some weeks ago (my guess is around 4th of december) my installation of HassIO is not able to connect to the outside world. E.g. it can’t connect to the weather service “yr”. Nor “DarkSky” or “Verisure”, nor can it push notifications using Pushover. All this worked fine before, but I can see that no DarkSky accesses has been made since 4th of december (so I guess it all ended there).

I have no problem accessing HassIO from outside my LAN (I’m using the DuckDNS addon), nor have I problems accessing other sites from the commandline (ie “ping google.com” works fine from “core-ssh#”, no problem there).

In the log I see many errors related to SSL, like the acess to yr:

Retrying in 18 minutes: Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:None [Try again]

Or like this trying to access DarkSky:

2018-12-22 20:44:28 ERROR (SyncWorker_10) [homeassistant.components.sensor.darksky] Unable to connect to Dark Sky: HTTPSConnectionPool(host=‘api.darksky.net’, port=443): Max retries exceeded with url: /forecast/xxx-my-token-xxxxx/48.xxxx,12.xxxxx?units=si&lang=sv (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x72380830>: Failed to establish a new connection: [Errno -3] Try again’,))

I have searched the forums and issues related to any SSL problems and similar issues, but so far I have been unable to resolve this issue, is there anyone out there who might have a clue or could point in the right direction?

I’m runnning the latest HassIO on a Raspberry Pi 3+, and using DuckDNS addon. And as mentioned, I have been running this for months without any problems, I can access HassIO from my phone, I can use the Configurator to update files, I can acces GitHub to push and pull changes from the commandline (core-ssh#), but I can’t get HassIO to get data from e.g. DarkSky or Verisure, nor push notifications to PushOver (see example below).

I should add that my configuration.yaml looks like this:

http:
  base_url:  my-url.duckdns.org:8123
  ssl_profile: intermediate

And the DuckDNS config looks like this:

{
  "lets_encrypt": {
    "accept_terms": true,
    "certfile": "fullchain.pem",
    "keyfile": "privkey.pem"
  },
  "token": "my-token-goes-here-xxxxxxxx",
  "domains": [
    "mossaio.duckdns.org"
  ],
  "seconds": 300
}

Best regards,
Thomas

Log Details (ERROR)
Sat Dec 22 2018 21:06:05 GMT+0100 (centraleuropeisk normaltid)

Error executing service <ServiceCall notify.pushover (c:afe41b517fb94ae6543e3e5f1a1b3a5): title=<homeassistant.helpers.template.Template object at 0x6f413a70>, message=<homeassistant.helpers.template.Template object at 0x6f413810>>
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/urllib3/connection.py”, line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File “/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py”, line 57, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File “/usr/local/lib/python3.6/socket.py”, line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 600, in urlopen
chunked=chunked)
File “/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 343, in _make_request
self._validate_conn(conn)
File “/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 839, in _validate_conn
conn.connect()
File “/usr/local/lib/python3.6/site-packages/urllib3/connection.py”, line 301, in connect
conn = self._new_conn()
File “/usr/local/lib/python3.6/site-packages/urllib3/connection.py”, line 168, in _new_conn
self, “Failed to establish a new connection: %s” % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x6f413190>: Failed to establish a new connection: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py”, line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘api.pushover.net’, port=443): Max retries exceeded with url: /1/messages.json?message=Diskmaskinen+%C3%A4r+klar%21&user=uxxxx-my-token-xxxx&title=Diskmaskinen&token=axxxx-my-token-xxxx (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x6f413190>: Failed to establish a new connection: [Errno -3] Try again’,))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1177, in _event_to_service_call
await service_handler.func(service_call)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/notify/init.py”, line 117, in async_notify_message
await notify_service.async_send_message(**kwargs)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/notify/pushover.py”, line 71, in send_message
self.pushover.send_message(message, **data)
File “/usr/local/lib/python3.6/site-packages/pushover.py”, line 271, in send_message
return MessageRequest(payload)
File “/usr/local/lib/python3.6/site-packages/pushover.py”, line 129, in init
Request.init(self, “post”, MESSAGE_URL, payload)
File “/usr/local/lib/python3.6/site-packages/pushover.py”, line 107, in init
request = getattr(requests, request_type)(url, params=payload)
File “/usr/local/lib/python3.6/site-packages/requests/api.py”, line 116, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File “/usr/local/lib/python3.6/site-packages/requests/api.py”, line 60, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python3.6/site-packages/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.6/site-packages/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.6/site-packages/requests/adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘api.pushover.net’, port=443): Max retries exceeded with url: /1/messages.json?message=Diskmaskinen+%C3%A4r+klar%21&user=uxxxx-my-token-xxxx&title=Diskmaskinen&token=axxxx-my-token-xxxx (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x6f413190>: Failed to establish a new connection: [Errno -3] Try again’,))

hi, did you every figure out what the cause of the issue was? This drives me mad, I have spent about a week trying to find a solution without success.

I finally found the problem, it is caused by googles DNS 8.8.8.8 and 8.8.4.4. I guess it is a bit late but I post it anyway hoping it might help other with the same issue.

Change your DNS settings as per https://github.com/home-assistant/hassos/blob/dev/Documentation/network.md BUT don’t use googles DNS. I have success with OpenDNS. SO try to set your IPV4 like that:

[ipv4]
method=manual
address=192.168.1.50/24;192.168.1.1
dns=208.67.222.222;208.67.220.220;

Hope that helps .

Hi, thanks (and sorry for not replying before!)!

I don’t recall what I did previously - but after several days of struggling and reinstalling - I ended up with a working installation … :stuck_out_tongue:
Anyhow, thanks for your reply - I will keep that in mind should it happen again (and I will check my DNS setting later today).

Cheers,
Thomas