首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Jmeter报错:readResponse: java.net.BindException: Address already in use: connect

Jmeter报错:readResponse: java.net.BindException: Address already in use: connect

作者头像
软件测试大叔
发布2026-04-22 12:36:55
发布2026-04-22 12:36:55
780
举报

原因:windows提供给TCP/IP链接的端口为 1024-5000,并且要四分钟(默认时间长度)来回收它们,就导致我们在短时间内跑大量的请求时,无端口可用,所以导致如上报错。

这里需要对windows负载机的参数进行调优,参见文章:Windows压测负载机调优_饭特稀cn-CSDN博客

如果负载机注册表参数已经调优,仍然报错,可以尝试如下方法:

If you are absolutely sure that your server is not overloaded and is configured to accept 100+ connections (defaults are good for development, not for production, they need to be tweaked) you can try work it around as follows:

In user.properties file add the next 2 lines:

代码语言:javascript
复制
httpclient4.retrycount=1
hc.parameters.file=hc.parameters

In hc.parameters file add the following line:

代码语言:javascript
复制
http.connection.stalecheck$Boolean=true

Both files live in JMeter's bin folder.

You need to restart JMeter to pick the properties up.

Above instructions are applicable for HttpClient4 implementation, make sure you use it, the fastest and the easiest way to set HttpClient4 implementation for all the HTTP Request samplers is using

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-03-04,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档