解决Windows jmeter Non HTTP response message: Address already in use: connect 错误

解决Windows jmeter Non HTTP response message: Address already in use: connect 错误

jMeter报错:

Response code: Non HTTP response code: java.net.BindException

Response message: Non HTTP response message: Address already in use: connect

原因:

When an HTTP request is made, an ephemeral port is allocated for the TCP / IP connection. The ephemeral port range is 32678 – 61000. After the client closes the connection, the connection is placed in the TIME-WAIT state for 60 seconds.

If JMeter (HttpClient) is sending thousands of HTTP requests per second and creating new TCP / IP connections, the system will run out of available ephemeral ports for allocation.

Otherwise, the following messages may appear in the JMeter JTL files:

Non HTTP response code: java.net.BindException

Non HTTP response message: Address already in use

The solution is to enable fast recycling TIME_WAIT sockets.

就是处于等待的60s的临时端口不够用了,解决方法就是降低TIME_WAIT时间

方法:

打开注册列表

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

右击Parameters -> 新建 -> DWORD(32位)值(D) -> name:TcpTimedWaitDe,value:30    –> 设置为30秒,默认是240秒

右击Parameters -> 新建 -> DWORD(32位)值(D) -> name:MaxUserPort,value:65534(十进制) –> 设置最大连接数65534

最后重启电脑

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值