Access via DuckDNS stopped working - SOLVED

So here is the strange situation.

Two days ago, I was able to access Home Assistant fine, both locally using 192.168.x.x or externally using xxx.duckdns.org. I updated to 0.66 and then yesterday evening noticed that I was no longer to access via DuckDNS either when inside or outside my local network. Tried downgrading to 0.65.6, but same problem. I do not believe I have changed anything and this setup has been working for the last 3 months.

My configuration for Duckdns is below

{
  "lets_encrypt": {
    "accept_terms": true,
    "certfile": "/ssl/fullchain.pem",
    "keyfile": "/ssl/privkey.pem"
  },
  "token": "abc..............xyz",
  "domains": [
    "###.duckdns.org"
  ],
  "seconds": 300
}

and the corresponding extract in my configuration.yaml file is

http:
  base_url: !secret base_url
  # Uncomment this to add a password (recommended!)
  api_password: !secret api_password
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

When I attempt to log in, I just get this…

image
Any ideas what might have changed? Or have I overlooked something obvious?

Check in your duckdns account that the address match your home public ip.
Also check in log for any error related to duckdns

Just checked the IP address. It seems to be OK. Furthermore, I see no errors in the log related to DuckDns.

Probably completely unrelated, but I have a strange log entry for my Nest. Not sure it is not related ,but I’ll add it just in case.

2018-04-02 14:00:48 ERROR (MainThread) [homeassistant.helpers.entity] Update for binary_sensor.upstairs_nest_protect_online fails
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/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/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x733028d0>: 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/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='firebase-apiserver22-tah01-iad01.dapi.production.nest.com', port=9553): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x733028d0>: 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/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 204, in async_update_ha_state
    yield from self.async_device_update()
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update
    yield from self.hass.async_add_job(self.update)
  File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/binary_sensor/nest.py", line 105, in update
    self._state = bool(getattr(self.device, self.variable))
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 224, in online
    return self._device.get('is_online')
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 603, in _device
    return self._devices[SMOKE_CO_ALARMS][self._serial]
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 200, in _devices
    return self._nest_api._devices
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 1619, in _devices
    return self._status[DEVICES]
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 1604, in _status
    value = self._get("/")
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 1587, in _get
    return self._request('GET', path)
  File "/usr/lib/python3.6/site-packages/nest/nest.py", line 1578, in _request
    data=data)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='firebase-apiserver22-tah01-iad01.dapi.production.nest.com', port=9553): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x733028d0>: Failed to establish a new connection: [Errno -3] Try again',))

Solved.

It seems there was some issue with cookies stored on my web browser. Once I cleared the history, I could access via xxx.duckdns.org. Apologies for the hysteria and thanks for the help.

1 Like

Same issue after update to 0.77.3 with hassbian, I just removed all cookies and It worked again. Unfortunately you have to erase cookies from all browsers your using HA with.

Great that worked for me also. Been trying to sort this for a couple of weeks, wasted so much time checking out the configuration. Anyway, sorted now. Thank you @Swiss

1 Like