0
votes

For a load test I have been preparing different POST calls. First in Postman (since I find it more user friendly), once that succeeded I have been setting up my actual load test in Jmeter. In Postman I consistently get the response I need, but in Jmeter I get the following error:

org.apache.http.NoHttpResponseException: (servername here):443 failed to respond at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:141) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:930) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:641) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1281) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1270) at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630) at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) at java.lang.Thread.run(Unknown Source)

So far I have concluded:

  1. The endpoint is identical in Jmeter to the endpoint in Postman
  2. The body is identical in Jmeter to the body in Postman
  3. I have copied the exact same headers from Postman to Jmeter
  4. The thread size is 1, so I find it hard to believe it is something with the server.

Is there something I am missing? What else could I try?

1
Try adding header User-Agent with value (using HTTP Header Manager)user7294900

1 Answers

0
votes

I can think of 2 possible reasons:

  1. The "endpoint" is not fully identical, i.e. there is a protocol/host/port mismatch, in order to make sure that JMeter configuration matches Postman 100% just record request(s) originating from Postman using JMeter's HTTP(S) Test Script Recorder, if you configure Postman to use JMeter as the proxy JMeter will capture the requests and create the relevant HTTP Request sampler(s) and HTTP Header Manager(s)
  2. Your machine is using upstream (corporate?) proxy for connecting to the Internet (or Intranet). It might be the case Postman is configured to respect operating system proxy settings and in JMeter you need to specify the proxy manually, see Using JMeter behind a proxy user manual chapter for more details