0
votes

I am trying to constuct a single API request using HTTP Request Sampler in JMeter, where the API payload has more than 5000 lines in it. After checking the request payload & headers, I tried to hit in JMeter, but it fails to respond back and thrown "SocketException: Connection reset" error.

Gone through this blog https://www.xtivia.com/blog/fixing-jmeter-socket-errors/ & tried to change the implementation to HTTPClient4 in the sampler after made the requested settings as mentioned here - I m getting java.net.SocketException: Connection reset exception while running a load test using Jmeter. But nothing helps with these options.

Same request (without any change) is working fine in Postman and gives expected response. Please help to resolve this issue.

Thanks in advance.

1

1 Answers

0
votes

Just to eliminate the eventual "copy-paste" issues try recording the request using JMeter's HTTP(S) Test Script Recorder

  1. Start JMeter's HTTP(S) Test Script Recorder
  2. Configure Postman to use JMeter as the proxy
  3. Import JMeter's certificate into Postman
  4. Run your request in Postman
  5. JMeter should generate the relevant HTTP Request sampler and HTTP Header Manager
  6. You should now be able to replay the request in JMeter

More information: How to Convert Your Postman API Tests to JMeter for Scaling

In case of problems:

  • add javax.net.debug=all line to system.properties file

  • add the next lines to log4j2.xml file

    <Logger name="org.apache.http" level="debug" />
    <Logger name="org.apache.http.wire" level="debug" />
    

    you will see way more troubleshooting information in stdout and jmeter.log file. Unfortunately your "connection reset" message doesn't say a lot to us