Search code examples
jmeterload-testingjmeter-5.0

jmeter - getting error code 500 from working server


Hello, everyone!

I'm trying to do a JMeter load testing on a service and currently I'm stuck with getting error code 500 from a working server.

The cURL command I've used as a reference works fine - I'm getting an OK 200 response, but the JMeter test plan created with Tool -> Import from cURL doesn't.

Notes:

  • I send JMeter requests from a pod in a k8s-node to a remote server, the architecture looks as follows:
<my pod> --> <balancer with VIP(virtual IP)> --> <one of two HAProxy servers> --> <target service> 
  • Using Docker image alpine/jmeter, JMeter 5.6.3

What can be the cause of these errors?


Solution

    • Maybe import from cURL doesn't result in the same HTTP request, try comparing the requests originating from cURL and JMeter using a sniffer tool like Wireshark, it might be the case you're missing a header in the HTTP Header Manager or something like this

    • Another way of converting a cURL request into JMeter's HTTP Request sampler is using HTTP(S) Test Script Recorder, it's possible to use JMeter as the proxy for cURL

    • And finally, HTTP status code 500 stands for internal server error, it worth checking server logs, you should be able to get more information or failure reason from there