Core: internal_url using duckdns and browser ERR_EMPTY_RESPONSE

Created on 24 May 2020  路  9Comments  路  Source: home-assistant/core

The problem


As it appears in the documentation I have configured the external_url and internal_url parameter as shown below. I have also tried to do it through the UI. In both cases, restarting HA and / or trying to reload the parameters from the configuration.

The problem is that when I try to access from the local URL, the browser gives me the following error: ERR_EMPTY_RESPONSE

Environment

  • Home Assistant Core release with the issue: 0.110.1
  • Last working Home Assistant Core release (if known): not relevant as this is a new feature
  • Operating environment (Home Assistant/Supervised/Docker/venv): Home Assistant
  • Integration causing this issue: basic config
  • Link to integration documentation on our website: https://www.home-assistant.io/docs/configuration/basic/

Problem-relevant configuration.yaml

  external_url: https://xxx.duckdns.org:8123
  internal_url: http://local.ip:8123 #not working with http://hassio:8123/ by the way

Traceback/Error logs

There is no related error log

Additional information

I am using duckdns addon. If I try to access using https: //local.ip: 8123 the problem disappears.

core

Most helpful comment

By the way a server can serve http and https at the same time

@ondoteam Actually, it can't. You have configured Home Assistant to serve SSL, which means it will always be SSL. This means your internal URL hint will also need SSL.

URLs settings in Home Assistant do not affect how Home Assistant runs, it only allows one to tell Home Assistant you know better. (e.g., when using reverse proxy setups or solving NAT loopback issues).

URLs have nothing to do with the http server of Home Assistant, hence, the new settings are not part of the http configuration either.

To make it more clear with an example: If you set the URL to https://www.facebook.com, your Home Assistant will not take over Facebook. 馃槈

Closing this, issue, as it is not an issue but a misunderstanding in what it does.

All 9 comments

I started having a issue where google says that my [Project Name] cannot be reached. Sometimes it works, other times not.

Recently google is unable to reach my home assistant to control switches, lights etc.

@jackkitley Please don't stack different issues. Instead, create a new one. Thanks 馃憤

@ondoteam Could you please provide the http configuration you are using?

In general, these URLs (just like the old base URLs) are only hints for integrations that need an URL to the instance, it has nothing to do with the HTTP configuration/webserver setup of the Home Assistant instance.

@frenck of course.

http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem 

Additional information

I am using duckdns addon. If I try to access using https: //local.ip: 8123 the problem disappears.

This is the key to the answer.

You have HA configured to use HTTPS, but are talking HTTP to it - that won't work.

Hello @hmmbob. Thank you for your reply. Are you sure? It is in the examples in the documentation. By the way a server can serve http and https at the same time. I am not sure about Home Assistant because there is no documentation.

@ondoteam Use a nginx proxy in front of it, then you can access hass locally and over https from outside of your network. The addon for it exists.

By the way a server can serve http and https at the same time

@ondoteam Actually, it can't. You have configured Home Assistant to serve SSL, which means it will always be SSL. This means your internal URL hint will also need SSL.

URLs settings in Home Assistant do not affect how Home Assistant runs, it only allows one to tell Home Assistant you know better. (e.g., when using reverse proxy setups or solving NAT loopback issues).

URLs have nothing to do with the http server of Home Assistant, hence, the new settings are not part of the http configuration either.

To make it more clear with an example: If you set the URL to https://www.facebook.com, your Home Assistant will not take over Facebook. 馃槈

Closing this, issue, as it is not an issue but a misunderstanding in what it does.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neonandu picture neonandu  路  3Comments

aweb-01 picture aweb-01  路  3Comments

sogeniusio picture sogeniusio  路  3Comments

sh0rez picture sh0rez  路  3Comments

bdraco picture bdraco  路  3Comments