owntracks / recorder

Store and access data published by OwnTracks apps
Other
892 stars 122 forks source link

Recorder map blank #498

Closed zkmay11 closed 1 month ago

zkmay11 commented 1 month ago

I'm learning and new to Owntracks after bailing on a previous location service, so forgive me if this doesn't make sense or I'm missing something obvious. When I open the Live Map it is blank with none of our devices, only a global view. The Frontend page seems to be working just fine, and the apps seem to be working. Unfortunately, I'm not sure where to begin troubleshooting the issue, if there is indeed an issue here with my setup. Screenshot 2024-09-18 120418

Jachimo commented 1 month ago

At least on my system, there should be a blue banner above the map, and on the left side of that banner (above the +/- zoom controls), there is a menu button with three horizontal lines (aka the "hamburger" icon). Clicking on that button switches the view to a list of settings that selects what is shown on the map—date range, user, device, etc.

It is not clear from your screenshot if the banner with the menu icon isn't being shown, or if you cropped it out.

zkmay11 commented 1 month ago

No cropping, anything else was just browser bar and web address. No errors in console, and OT service running with no issues

jpmens commented 1 month ago

(The blue banner Jachimo refers to is in Frontend)

I'm glad Frontend and everything else is working for you, @zkmay11 . Things you can do:

Does the table with live data get populated?

zkmay11 commented 1 month ago

So it does look like the .rec files are getting data from devices when locations are published. The device table is also populated with correct data, and Frontend is showing movement updates. I've got some occasional "location out-of-order, skipping 'last' update" notices in the recorder journal, but it seems like the live map just isn't displaying the last published locations.

Screenshot 2024-09-19 204408

Screenshot 2024-09-19 204425 (browser bar just cropped out of screenshots)

jpmens commented 1 month ago

Are you accessing these pages via a HTTP proxy? Can you test with a local URL (http://localhost:8083/....

zkmay11 commented 1 month ago

Okay; think this narrows it down to the Apache reverse proxy. It's a headless server (no GUI installed) sitting behind an Apache reverse proxy. Registrar is CloudFlare, but proxying is turned off for this domain. Accessing the server locally with the IP (HTTP) lands me on the default Nginx page, accessing with IP (HTTPS) prompts login, and the live map works as it should, Frontend is blank though. When accessed through the configured domain, i.e. going through the reverse proxy, Frontend displays just fine, but the live map doesn't, so I'm going to guess its something in the Apache directives. They're currently:


    ServerName xxx.xxx
    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / http://10.0.6.11:80/
    ProxyPassReverse / http://10.0.6.11:80/    
    ProxyPass   /owntracks/ws   ws://10.0.6.11:8083/ws keepalive=on retry=60
    ProxyPassReverse    /owntracks/ws   ws://10.0.6.11:8083/ws keepalive=on    
    ProxyPass /owntracks    http://10.0.6.11:8083/
    ProxyPassReverse /owntracks     http://10.0.6.11:8083/
    ErrorLog ${APACHE_LOG_DIR}/owntracks_error.log
    CustomLog ${APACHE_LOG_DIR}/owntracks_access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =owntracks.xxx.xxx [OR]
RewriteCond %{SERVER_NAME} =www.owntracks.xxx.xxx
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]



    ServerName owntracks.xxx.xxx
    SSLEngine on
    SSLProxyEngine on
    SSLProxyCheckPeerCN Off
    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / https://10.0.6.11:443/
    ProxyPassReverse / https://10.0.6.11:443/    
    ProxyPass        /owntracks/ws        ws://10.0.6.11:8083/ws keepalive=on retry=60
    ProxyPassReverse /owntracks/ws        ws://10.0.6.11:8083/ws keepalive=on
# Static files
    ProxyPass /owntracks                  http://10.0.6.11:8083/
    ProxyPassReverse /owntracks           http://10.0.6.11:8083/    
    ErrorLog ${APACHE_LOG_DIR}/owntracks_error.log
    CustomLog ${APACHE_LOG_DIR}/owntracks_access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/xxx/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxx/privkey.pem


jpmens commented 1 month ago

I see a ProxyPass (and reverse) for / to http: and to https:

Note that our backend doesn't do https so that might be an issue in your configuration

zkmay11 commented 1 month ago

That makes sense then and explains what is going on; some tweaks for local access should resolve that, thanks!