I switched from using Openhabian to using a docker container on Raspbian to make it easier to keep up to date and to backup.
I have nginx working, and can access OpenHAB from anywhere, but the Log Viewer doesn’t work under the developer tools. It says it uses web sockets, so I’m assuming I need to open a port, but what port? I see people using frontail on port 9001, but I’m not trying to setup a separate log viewer, just the built in one.
WebSockets use the HTTP ports, so it will be 80, 443, 8080 etc. depending on your setup. Nothing special should be needed.
That said, I don’t know anything about configuring nginx, but I’d guess that there’s something there that goes wrong. A WebSocket starts life as a regular HTTP connection, which is then “upgraded” to a WebSocket. If nginx is a proxy and doesn’t play ball during the upgrade process, it could fail.
Unfortunately there are no errors in userdata/logs/openhab.log Should I enable more detailed logging for one of the openhab components? I tried setting “org.openhab” to TRACE level, but didn’t see anything about the log viewer.
The chrome developer console shows
index-Buyt_kkZ.js:23370 WebSocket connection to ‘ws://MY PUBLIC ADDRESS:8080/ws/logs’ failed
Maybe because nginx would be requesting authentication?
If the error occurs before this reaches OH at all, there might not be anything in the OH log.
The dev console message indicates that something along the way blocks this, so I would perhaps try to inspect or enable nginx logging. I would also try to access OH directly, without nginx, to verify that nginx is in fact the problem.
Note that a working ngnx reverse porch config is in the docs at Running openHAB Behind a Reverse Proxy | openHAB. You should compare what you have now to that just in case there is some other header or something missing that you haven’t discovered yet.