- Platform information:
- Hardware: Raspi 4, 4GB
- OS: Openhabian 1.6
- openHAB version: 2.5.10-1 (Release Build)
- Issue of the topic: I am using Nginx as a reverse proxy and frontail is empty.
Hi everyone,
I am currently migrating my Openhab from a Raspi 3B+ to a Raspi 4. So far the transition was going well, items, binding etc. were migrated correctly (though I did that by hand). Now the only problem that remains is my nginx as reverse proxy.
I already used that with my 3B and there it worked flawlessly. Since I wanted to be able to access my openhab (including logs, paper ui etc.) from the outside, I needed to setup nginx as a reverse proxy. From there, I proxy passed to all the other locations, like grafana or fonrtail. For Frontail, my configuration is as follows:
location /frontail {
satisfy any;
allow 192.168.178.29;
allow 192.168.178.26;
deny all;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:9001/frontail;
}
Accordingly, the frontail service is setup with this location:
ExecStart=/usr/lib/node_modules/frontail/bin/frontail --url-path /frontail --host 127.0.0.1 --ui-highlight --ui-highlight-preset /usr/lib/node_modules/frontail/preset/openhab.json -t openhab -l 2000 -n 200 /var/log/openhab2/openhab.log /var/log/openhab2/events.log
The weird part is, with this configuration in my Raspi 3, everything runs as is should. On the new Raspi however, frontail is not showing the log properly in the browser, it’s simply empty:
When I configure frontail without the url-path and host, I can access it through :9001, so the service itself is running correctly.
When I try to access it, my nginx shows the following error log:
2020/11/13 23:30:23 [error] 6005#6005: *9830 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.178.29, server: <my-openhab-server-address>, request: "GET /frontail/styles/openhab.css HTTP/1.1", upstream: "http://[::1]:9001/frontail/styles/openhab.css", host: "openhabiandevice.fritz.box", referrer: "http://openhabiandevice.fritz.box/frontail/"
192.168.178.29 = my local Windows PC IP trying to access the page
openhabiandevice = Raspi 4 device name in local network
Is there anything else to configure so that my Raspi 4 behaves as the Raspi 3? Nginx config, Frontail Config etc. is all migrated to the new device, so that should not be the problem.
Looking forward to the input of the experts here.
Kind Regards,
Christoph