Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Data: Prepare download nothing happens #548

Open
suntrop opened this issue Sep 27, 2024 · 1 comment
Open

Export Data: Prepare download nothing happens #548

suntrop opened this issue Sep 27, 2024 · 1 comment

Comments

@suntrop
Copy link

suntrop commented Sep 27, 2024

I want to move some sites to a new server/PL and need to export data.

I just upgraded to ghcr.io/plausible/community-edition:v2.1.0-rc.1 (ghcr.io/plausible/community-edition:v2.1.3 didn't work somehow).

But something is wrong with the WebSocket connections. The snippets on the /sites dashboard don't show any metrics and I guess the same problem with WebSockets on the export section. When I click "Prepare download" I get this error in the JS console:

WebSocket connection to 'wss://analytics.example.com/live/websocket?_csrf_token=RjMzRQcRaRwWOVYYCCMbAj12UwwEcREHpPZNuY9recfLxZhwCCgOW2Bv&_mounts=0&_live_referer=undefined&vsn=2.0.0' failed: There was a bad response from the server.

And nothing happens.

The PL logs last entries are Migration done! Migrations successful!

@suntrop
Copy link
Author

suntrop commented Sep 27, 2024

I got it working. It was just the second I posted it, it came to my mind the problem is not the export, but WS.

Found a solution for NGINX, but I am using Apache.

If someone has the problem, this works for me:

<IfModule mod_proxy.c>
    ProxyPass /.well-known/acme-challenge !
</IfModule>

Alias /.well-known/acme-challenge /home/keyhelp/www/.well-known/acme-challenge

ProxyPreserveHost On

# WebSocket-Support
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://localhost:8000/$1" [P,L]

ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/

# Header-Einstellungen
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"

And for none https just redirect all to https.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant