GithubHelp home page GithubHelp logo

/setCurrency and /cart/checkout locust testing causes HTTPError('405 Client Error: Method Not Allowed for url: ..) about microservices-demo HOT 4 OPEN

antokarant avatar antokarant commented on June 17, 2024
/setCurrency and /cart/checkout locust testing causes HTTPError('405 Client Error: Method Not Allowed for url: ..)

from microservices-demo.

Comments (4)

antokarant avatar antokarant commented on June 17, 2024 1

Hello @minherz thanks for your reply. The requests are the ones that already exist in the locustfile.py.

When trying with postman or curl I just create a default post request to /setCurrency or /cart/checkout and it works fine without any headers or body.

I also tried it with python requests library and no problem occurred with it either.

In the meanwhile, I found that by replacing HttpUser with FastHttpUser the problem seems to go away so it might be something in the configuration of HttpUser that causes the issue.(a default request flag maybe)

from microservices-demo.

minherz avatar minherz commented on June 17, 2024

@antokarant thank you for reporting this to us. We will review your use case and see if we can assist. Can you please share the full request and response bodies for the aforementioned requests?

from microservices-demo.

NimJay avatar NimJay commented on June 17, 2024

@antokarant thanks for the very clear description of your issue!
@minherz thanks for the quick response and looking into this!

@antokarant:

  • I'm glad you were able to get it working with FastHttpUser instead of the plain HttpUser.
  • According to this doc:
  • So it's likely (as you suggested) that there is some difference in the HTTP requests (e.g., default set of headers) (used by python-requests and geventhttpclient).
  • If you do figure out that difference (and specifically what's causing the 405), let us know — especially if it's something that needs to be fixed on Online Boutique's (microservices-demo's) end.

Questions:

  1. Which version of Online Boutique are you using? The current main branch? Or a specific tag?
  2. Are you able to see exactly what the failing /setCurrency and /cart/checkout requests look like (i.e., list of headers, the body, referrer)? If you're building the microservice Docker images from scratch, perhaps you could add some logs into the frontend to see exactly what the requests to /setCurrency and /cart/checkout look like? Or I wonder if there's a way to log all the details of the requests via Istio.

Thanks!

from microservices-demo.

antokarant avatar antokarant commented on June 17, 2024

@NimJay thanks for your reply.

  • I am using the main branch and I deployed the project using the Kustomize tool on a local cluster as I also need it to be istio-mesh enabled.

  • To answer your second question, I could not exactly see the request that caused the error. I tried different headers using python-requests but I could not find the solution.

Question:
I found out that kustomize uses container images already on google cloud so I can not find a way to change the requests inside the load-generator pod(the proposed fix using FastHttpUser was tested while using Locust from my local machine to access the cluster). I was wondering if there is a way to deploy using skaffold but also to have istio installed. Or if there is another workaround to fix my issue.

Thanks!

from microservices-demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.