I’m facing a weird issue that I find hard to reliably reproduce. When I’m home, connected to my home WiFi, and it’s been at least a couple hours since I last used the Android app, when I start the app, 3 out of 4 times I get a 500 error. If I try connecting again, it always works, and doesn’t come up again, until I quit the app and wait a few hours. This issue doesn’t occur when connecting to the remote address. Neither does it occur when I access openHAB using a web browser from the internal network.
My network setup is as follows:
Internal access:
Client → nginx running as reverse proxy on openHAB box on port 443 → forward traffic to Jetty on localhost port 8080
The nginx reverse proxy requires the client to authenticate using an SSL certificate.
External access:
Client → nginx reverse proxy on a server other than openHAB on port 443 → nginx reverse proxy on openHAB box on port 444 → forward traffic to Jetty on localhost port 8080
The first nginx reverse proxy requires the client to authenticate using both an SSL certificate and Basic authentication. The second nginx does not require authentication.
When this issue occurs, there are absolutely no events logged in either the access or the error in nginx, so it looks like the HTTP request never reached the server.
I have attached both a log from HABDroid, and the port 443 site configuration from the nginx running on the openHAB server. In the HABDroid log, you can see the 500 error just before line 500, on line 496.
Also, just before that there is an SSL error in the log, but since nginx didn’t mention this error anywhere, I suspect that it never reached nginx.
habdroid_log.txt (70.6 KB)
nginx-site.conf.txt (2.2 KB)
Any ideas on how to investigate this issue further are welcome. I’m completely lost.