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

Blank page when accessing Locust Web UI via reverse proxy with subpath #2614

Closed
2 tasks done
skyanth opened this issue Feb 27, 2024 · 7 comments · Fixed by #2615
Closed
2 tasks done

Blank page when accessing Locust Web UI via reverse proxy with subpath #2614

skyanth opened this issue Feb 27, 2024 · 7 comments · Fixed by #2615
Labels

Comments

@skyanth
Copy link

skyanth commented Feb 27, 2024

Prerequisites

Description

Similar to #149 - the webui code has changed since then and the same problem arises, this time with the /assets/ path, which is absolute instead of relative. The result is that an nginx location directive such as this one:

location /locust/mybackend {
    rewrite ^/locust/mybackend/(.*) /$1 break;
    proxy_pass http://locust_mybackend:8089;
}

...results in a blank page because the webpage is trying to load http://myserver/assets/blabla.js instead of http://myserver/locust/mybackend/assets/blabla.js

Command line

irrelevant

Locustfile contents

irrelevant

Python version

irrelevant (but 3.12)

Locust version

2.23.1

Operating system

irrelevant

@skyanth skyanth added the bug label Feb 27, 2024
@skyanth
Copy link
Author

skyanth commented Feb 27, 2024

I'm trying to push my branch but I'm not allowed, do you guys need to add me before I can?

❯ git push --set-upstream origin 2614-fix-absolute-assets-references
ERROR: Permission to locustio/locust.git denied to skyanth.
fatal: Could not read from remote repository.

@cyberw
Copy link
Collaborator

cyberw commented Feb 27, 2024

Hi! Thanks for wanting to contribute! You should make a fork (push the fork button in github ui), push to that and then make a pull request from that to locustio project.

image

https://docs.locust.io/en/stable/developing-locust.html

@skyanth
Copy link
Author

skyanth commented Feb 27, 2024

Yes. I read that bit, just not well enough. Sorry, will do!

@Sergei-Okhlopkov
Copy link

You can use command below, to start locust, if your web-ui is blank

locust --legacy-ui

@cyberw
Copy link
Collaborator

cyberw commented Apr 27, 2024

You can use command below, to start locust, if your web-ui is blank

locust --legacy-ui

Legacy UI is deprecated and will be removed soon though.

@Sergei-Okhlopkov
Copy link

You can use command below, to start locust, if your web-ui is blank

locust --legacy-ui

Legacy UI is deprecated and will be removed soon though.

Ok, but how I can solve that problem with blank locust web-gui?

@cyberw
Copy link
Collaborator

cyberw commented Apr 29, 2024

If your GUI is just blank and you havent done anything out of the ordinary, then please file a separate ticket with all your details. This issue was specifically about when you run an nginx in front of Locust (and it is supposed to be fixed, so no workaround should be needed if you are on latest version)

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

Successfully merging a pull request may close this issue.

3 participants