【问题标题】:How to resolve java.net.socketexception connection reset error in jmeter?如何解决 jmeter 中的 java.net.socketexception 连接重置错误?
【发布时间】:2016-08-09 08:58:54
【问题描述】:

配置:Jmeter 3.0OS:Linux jdk:1.8

当我运行 https(REST Api) 请求时,View Results Tree 显示:

Response code:Non Http Response code:java.net.socketException

Response message:Connection Reset 

我该如何解决这个问题?

【问题讨论】:

  • 分享您的请求
  • 1 线程用户和 1 秒加速时间,仅此而已,相同的 jmx 文件在 windows 系统上运行良好

标签: jmeter


【解决方案1】:

将所有 HTTP Request 采样器中的 Implementation 更改为 HttpClient4

在您的 JMeter 安装文件夹的 /bin 文件夹下的 user.properties 文件中添加以下属性:

httpclient4.retrycount=1
hc.parameters.file=hc.parameters

将下一行添加到hc.parameters 文件(相同位置,JMeter 的/bin 文件夹)

http.connection.stalecheck$Boolean=true

重启 JMeter。

  • 另外,HTTP Request Sampler/Defaults 中的Use KeepAlive 复选框。

这些thread#1thread#2 也可能有所帮助。

【讨论】:

    【解决方案2】:

    连接重置可能表示服务器端或架构的中间组件存在问题。

    https://stackoverflow.com/a/31781529/460802

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-15
      • 2017-09-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多