1

Im trying to execute a scenario in jmeter. While I test from my local system I'm not getting any errors (tested for 1000 users). However, when I execute through a remote desktop connection from my client's network Im getting error even for 2 users/threads.

org.apache.http.conn.HttpHostConnectException: Connect to ---[] failed: Connection refused: connect at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$JMeterDefaultHttpClientConnectionOperator.connect(HTTPHC4Impl.java:401) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) 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)

Im unable to understand where Im going wrong. Kindly help with suggestions/fixes.

Chinnu
  • 19
  • 3

1 Answers1

0

There is nothing you can "fix" from JMeter side here, the error means that JMeter cannot connect to the system under test at the given port to the given host.

Try to access the endpoint using web browser and if it works - then most probably your "client" is using some form of a proxy server and you need to make JMeter aware of this proxy.

If it doesn't - reach out to your client's network administrator as it might be the case the system you're trying to test is blocked by firewall or something like this.

You can also enable debug logging for JMeter's HTTP Request samplers by adding the next line to log4j2.xml file

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

and after JMeter restart you should see way more information regarding what's going on under the hood in jmeter.log file. Compare the logs from your local machine and remote machine in client's network and report the differences.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133