Jmeter_Non HTTP response code: java.net.SocketException

error msg

rc="Non HTTP response code: java.net.SocketException" 
rm="Non HTTP response message: Socket closed"
<responseData class="java.lang.String">java.net.SocketException: Socket closed&#xd;
    at java.net.SocketInputStream.socketRead0(Native Method)&#xd;
    at java.net.SocketInputStream.socketRead(Unknown Source)&#xd;
    at java.net.SocketInputStream.read(Unknown Source)&#xd;
    at java.net.SocketInputStream.read(Unknown Source)&#xd;
    ...
</responseData>

reason

Jmeter 2.10 后禁用了重新访问失败request
Jmeter 2.11后禁用了httpclient3和4的stalecheck

首先server开启socket,等待request访问。
当大量request并发进行时,request1先进入到socket,并且server通过socket读取了request1的一行,但这时request2也进入到socket并被server读取完毕,然后关掉了socket. 这时request1无法被server从socket读取stream,返回closedsocket

soulution

JMeterSocketClosed

Enabling retry
For HttpClient 4, in user.properties set : 
httpclient4.retrycount=1 
This will make JMeter retry once. For HttpClient 3, in user.properties set: 
httpclient3.retrycount=1 
This will make JMeter retry once. 

Enabling stale check
For HC4 Implementation: 
In user.properties: 
hc.parameters.file=hc.parameters 
In hc.parameters set: 
http.connection.stalecheck$Boolean=true 
For HC3 Implementation: 
In user.properties: 
httpclient.parameters.file=httpclient.parameters 
In httpclient.parameters set: 
http.connection.stalecheck$Boolean=true 

releated:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值