jmeter--- 报错org.apache.http.NoHttpResponseException:
程序员文章站
2022-03-17 15:43:34
...
imac
jmeter-4.0
jmeter报错信息:
org.apache.http.NoHttpResponseException: 192.168.1.139:9111 failed to respond
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:141)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:286)
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:257)
at org.apache.jmeter.protocol.http.sampler.hc.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:199)
at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.receiveResponseHeader(MeasuringConnectionManager.java:212)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:684)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:486)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:697)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:455)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250)
at java.base/java.lang.Thread.run(Thread.java:844)
解决:
1.取消勾选Use Keep-alive
2.编辑 bin目录下的jmeter.properties文件
#httpclient4.idletimeout=0 这一行放开注释
修改idletimeout的时间,设置成自己认为合理的时间,一般可设置成10-60s,表示连接空暇10s后才会断开,这里单位是ms。
例如 httpclient4.idletimeout=11000 表示连接空暇11s后才会断开
如下图:
具体原因、细节参考:
https://wiki.apache.org/jmeter/JMeterSocketClosed
https://jingyan.baidu.com/article/c33e3f48ffe529ea15cbb596.html
推荐阅读
-
sudo service: command not found 报错的解决方法
-
DiskGenius软件报错提示终止位置参数溢出该怎么办?
-
IE8下Jquery获取select选中的值post到后台报错问题
-
常见Web报错代码
-
PHP Undefined index报错的修复方法
-
vuex 解决报错this.$store.commit is not a function的方法
-
SQL Server2005打开数据表中的XML内容时报错的解决办法
-
sqlserver安装报错:an error was encountered 数据无效
-
vuex2中使用mapGetters/mapActions报错的解决方法
-
pip install browsercookie报错问题