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

Endpoint /tasks returns 404 when serving locust under non-root path #2071

Closed
benispeti opened this issue Apr 12, 2022 · 3 comments
Closed

Endpoint /tasks returns 404 when serving locust under non-root path #2071

benispeti opened this issue Apr 12, 2022 · 3 comments

Comments

@benispeti
Copy link

benispeti commented Apr 12, 2022

Describe the bug

Our server hosts several applications, so I'm hosting locust service under the <hostname>/locust URL. Locust looks good at first, but the /tasks request are all failing at the background with a 404 response.

Expected behavior

Page loads without error. Backend calls respects the base path.

Actual behavior

/tasks requests are going to wrong path. Requests are sent to <hostname>/tasks, but they should go to <hostname>/locust/tasks. If I manually navigate to <hostname>/locust/tasks, then it works fine, but locust frontend sends the requests to wrong path.

image

Steps to reproduce

Environment

  • OS: Docker
  • Python version:
  • Locust version: 2.8.5
  • Locust command line that you ran:
  • Locust file contents (anonymized if necessary):
@benispeti benispeti added the bug label Apr 12, 2022
@benispeti
Copy link
Author

Hi! Do you need more information on this issue?

@cyberw
Copy link
Collaborator

cyberw commented May 9, 2022

I think this is related to #2030

The leading ./ in all links looks weird to me. If you can, then try removing it and see if it helps.

Doing that may cause issues for k8s users (as mentioned there), but I think it is not really the right solution.

@cyberw
Copy link
Collaborator

cyberw commented May 9, 2022

Closing this as duplicate to keep the conversation in one place

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

No branches or pull requests

2 participants