Skip to content
This repository has been archived by the owner on Sep 25, 2022. It is now read-only.

Forked-daapd ingress #14

Open
Ulrar opened this issue Jun 14, 2020 · 5 comments
Open

Forked-daapd ingress #14

Ulrar opened this issue Jun 14, 2020 · 5 comments

Comments

@Ulrar
Copy link
Owner

Ulrar commented Jun 14, 2020

I'm pushing a first try at ingress. It seems to work pretty well if you're accessing HA directly, as far as I can tell at least.

On the other hand if you're accessing HA through some reverse proxy (I'm using HAProxy on my router with SSL offloading) it's a bit trickier for the websockets, you either need a very long timeout or ideally I might add support for SSL directly into the addon's nginx, that way it could be done with a TCP backend. Not sure how the nabu casa works, I suspect it'll have the same issue.
I'm opening this to track it, I'm open to suggestions of course.

I need to play around with it a bit more but in the meantime for people with simpler setup this should work just fine.
Please let me know here if you have any problems with it.

Ulrar pushed a commit that referenced this issue Jun 14, 2020
@GoSpursGoNL
Copy link

GoSpursGoNL commented Oct 31, 2020

First of all, thanks for this awesome addon.

In general it is working fine if I open in the browser: 192.168.0.11:3689
But if via the supervisor I click on 'Open web UI', or via the sidebar, then I get the error:

Failed to connect to forked-daapd 
Request failed (status: 404 Not Found, url: http://192.168.0.11:8123/api/hassio_ingress/WYy0JkD2dIHUvc1IIB7tA0rJH2AW03S0LWD_8aPJrIc//.api/config) 

The url then is: http://192.168.0.11:8123/hassio/ingress/e4ac757a_forked-daapd

For the moment I solved it by disabling the sidebar icon, and manually adding a link in the sidebar to the working url, via: https://www.home-assistant.io/integrations/panel_iframe/

@fredrikbaberg
Copy link
Contributor

fredrikbaberg commented Nov 3, 2020

I'm also encountering this issue. Through Ingress I see:

Failed to connect to forked-daapd
Request failed (status: 404 , url: https://<redacted>/api/hassio_ingress/<long string>//.api/config)

I have a reverse proxy (Traefik) in front of Home Assistant, the same issue occurs if I use the IP to access Home Assistant. If I use http://<IP>:3689 it works properly.

@squireblackdens
Copy link

Same issue here. Any resoution?

@Ulrar
Copy link
Owner Author

Ulrar commented Nov 16, 2020

I'm not sure you all have the same issue, but unfortunately most of the web UI depends on websocket connections made over port 3688. For @fredrikbaberg at least, since you mention you're using a reverse proxy, you'll need to configure that port to be proxied as well.

Without a reverse proxy it should work, as long as port 3688 is open on the same IP you're accessing HA through, but there again depending on setups that might be an issue.
There's been an update to the web UI since I've made this addon so some of that might be a bit better in the latest version, which I'll need to update the addon to, but I don't really expect it to not be a pain because of those websockets sadly.

@fredrikbaberg
Copy link
Contributor

I'm not sure you all have the same issue, but unfortunately most of the web UI depends on websocket connections made over port 3688. For @fredrikbaberg at least, since you mention you're using a reverse proxy, you'll need to configure that port to be proxied as well.

Without a reverse proxy it should work, as long as port 3688 is open on the same IP you're accessing HA through, but there again depending on setups that might be an issue.
There's been an update to the web UI since I've made this addon so some of that might be a bit better in the latest version, which I'll need to update the addon to, but I don't really expect it to not be a pain because of those websockets sadly.

I'm trying to understand the reverse proxy part. I have limited experience with reverse proxy, but am not conviced that is the issue for me.
I have Traefik in a separate VM from Home Assistant. There are three ways for me to access Home Assistant: External URL (through reverse proxy), internal URL or LAN IP. I get the same issue through all three methods of access: Request failed (status: 404 Not Found, url: http://\<intenal hostname or LAN IP\>:8123/api/hassio_ingress/\<redacted\>//.api/config). For external URL it's https and no port, but otherwise the same message.
If the issue was with reverse proxy, should it not work if I use internal URL or LAN IP?

I've redacted part of the URL, but there are two forward slash there (//.api/config), could the URL be incorrect?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants