报错截图如下:

JMeter_性能压测报错address already in use:connect

原因分析:

这个问题的原因是windows端口被耗尽了(默认1024-5000),而且操作系统要 2~4分钟才会重新释放这些端口,所以可以增加windows的可用端口来解决。windows端口最大数为65535

 

解决方法:

修改操作系统注册表

1、cmd输入:regedit
2、找到HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters
3、新建 DWORD值,name:MaxUserPort,value:65534(十进制)

4、重启系统

 

上面这个方法能解决一部分问题。虽然增加了端口数,但压测的时候2分钟内发送超过 70000 个请求,还是报了 Address already in use: connect 的问题。

解决该问题有两种方法,一种是修改Jmeter配置项,一种是修改操作系统注册表

解决方法一:.

修改Jmeter配置项

不勾选 Use KeepAlive ,该配置默认勾选,去掉勾选后,请求就变为短连接。

JMeter_性能压测报错address already in use:connect

 

解决方法二:.

修改操作系统注册表

1、cmd输入:regedit
2、找到HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters
3、新建 QWORD值,name:TcpTimedWaitDelay,value:30(十进制)

4、重启系统

JMeter_性能压测报错address already in use:connect

 

相关文章:

  • 2021-10-28
  • 2022-02-08
  • 2022-03-02
  • 2022-12-23
  • 2021-09-01
  • 2021-10-14
  • 2021-06-07
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
  • 2022-01-11
  • 2021-03-31
相关资源
相似解决方案