收到错误“响应代码:非 HTTP 响应代码:org.apache.http.conn.HttpHostConnectException"在 jmeter 中

2022-01-24 00:00:00 connection jmeter java

我正在使用 JMeter 执行负载测试,用户应该在其中执行 Launch--Login--clk dashboard Page--clk 登陆页面(登录后出现的页面,即主页),其中clk dashboard 和clk 登陆页面 重复动作5 次.

I am executing load test using JMeter where users are suppose to do Launch--Login--clk dashboard Page--clk landing page (the page which come after login i.e. home page) where clk dashboard and clk landing page are repetitive action for 5 times.

当我增加用户负载时,我没有收到任何错误,直到 30 个用户我开始收到错误,因为

Till 30 users I am not getting any error when i increased users load i am start getting an error as

响应代码:非 HTTP 响应代码:org.apache.http.conn.HttpHostConnectException响应消息:非 HTTP 响应消息:连接到 https://stage.ideas.com 被拒绝

Response code: Non HTTP response code: org.apache.http.conn.HttpHostConnectException Response message: Non HTTP response message: Connection to https://stage.ideas.com refused

Response headers:


HTTPSampleResult fields:
ContentType: 
DataEncoding: null

在样本结果中.

任何人都可以建议我为什么会收到此错误吗?有时它适用于 100 个用户,有时我会收到错误消息.

Could any one suggest why I am getting this error ? Sometimes it works for 100 users and sometimes I am getting an error.

非常感谢.

推荐答案

连接被拒绝,这意味着 JMeter 无法连接到您的服务器以执行所需的测试.

You are getting connection refused, this means that JMeter is not able to connect to your server to perform the required test.

这可能是因为:

  1. 服务器不再监听端口,就像崩溃了一样
  2. 互联网连接中断,在您这边、服务器端或中间
  3. 您与服务器之间的某些防火墙或代理或类似组件正在拒绝连接

由于您正在运行测试,并从同一个 IP 产生大量连接到服务器,我会先检查数字 3,这意味着某些防火墙或代理出于过度负载或安全原因将您的活动限制在服务器上.

Since you're running tests, and spawning a lot of connections from the same ip to the server, I would check the number 3 first, meaning some firewall or proxy is limiting your activity to the server for excessive load or security reasons.

相关文章