hassio-addons / addon-nginx-proxy-manager

Nginx Proxy Manager - Home Assistant Community Add-ons
https://addons.community
MIT License
328 stars 102 forks source link

Ingress add-ons will not display when HA proxied through NPM add-on #318

Closed richsands closed 2 years ago

richsands commented 2 years ago

Problem/Motivation

Unable to display add-on web GUIs that use Ingress, when HA is proxied through NPM

Expected behavior

Access HA through hass. URL proxied by NPM add-on. All other add-ons including those using Ingress display normally.

Actual behavior

HA works normally, and SSL works fine, except that my add-ons using Ingress do not display - specifically, Terminal, Studio Code Server, and Node-RED.

Access is entirely on my LAN. Pi-hole DNS resolves hass. to the NPM add-on IP address, standard ports. Not coming in from the Internet and my router.

For the 3 add-ons I have tried, here is what I see: Terminal shows a blank black screen.

Studio Code Server displays an error: "An unexpected error occurred that requires a reload of this page. The workbench failed to connect to the server (Error: WebSocket close with status 1006). Reloading repeats this error.

Node-RED looks like it is working - progress bar and nodes displayed but then a red-bordered error at the top "Lost connection to server, reconnecting...".

I have tried this with different browsers: Chrome, Safari on Mac, Chromium, Firefox on Ubuntu, Safari on IOS, all give the same errors. Also the same error when HA is installed as a PWA on Chrome on Mac. I have reinstalled the add-on, restarted HA and the Supervisor. No change.

No problem accessing Ingress add-ons through Home Assistant Cloud. When I visit the HA server using IP address and port # - http://192.168.1.4:8123 everything works as expected including Ingress add-ons. I have 4 other proxy hosts configured with the NPM add-on, using the same wildcard SSL certificate, and all work as expected, no problems with SSL or proxying the URLs. Only problem is with Ingress add-on access.

HA version: core-2021.12.10, Supervisor: supervisor-2021.12.2, NPM add-on: Current version: 0.11.0. HA, Supervisor, and add-ons all installed as a VM running on Proxmox 6.4-13, running on an Intel NUC. 4 CPUs allocated, 10GB memory allocated, 32 GB boot disk size - very low CPU utilization, typical memory utilization after weeks of uptime ramps up to about 75% - presumably mostly Linux disk cacheing.

Steps to reproduce

Set up NPM add-on using provided install instructions. Configure new proxy host hass., scheme http: Forward hostname/IP: 192.168.1.4 (or your HA's local address), Forward port: 8123. Turn on Websockets support, and Block Common Exploits. Configure SSL with a LetsEncrypt wildcard certificate, *. generated by certbot using command line, DNS challenge.

Visit hass.. Click sidebar for an Ingress GUI add-on. Add on does not display. Errors as above are displayed instead.

Attached - the error screen from Studio Code Server, and a log file from the NPM add-on with logging = debug, with a fresh start, followed by attempt to access Studio Code Server add-on from Chrome on Mac, proxied through hass.example.com on my LAN.

HA-addons-NPM-sample-error HA-addons-NPM-debug-log.txt

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!