JMeter 4.0:录制java.net.SocketException时:在java.net.SocketInputStream.read(未知源)

时间:2018-02-15 12:24:17

标签: java jmeter

我使用的是JMeter 4.0软件。 我使用录音模板。 我还在浏览器(Internet Explorer)中设置了代理(即localhost)和端口(8888,也在JMeter HTTPS测试脚本记录器中设置)。

之后我点击JMeter弹出窗口中的开始按钮(证书)。我还安装了证书并将其导入浏览器。

但在浏览器中遇到以下问题。

java.net.SocketException: Connection reset at
java.net.SocketInputStream.read(Unknown Source) at
java.net.SocketInputStream.read(Unknown Source) at
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:161) at
org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:82) at
org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:278) at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) 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.proxy.Proxy.run(Proxy.java:235) 

导致这种情况的原因是什么?

1 个答案:

答案 0 :(得分:0)

对于需要安装新适配器的Windows 8用户,loopback(localhost)可能存在问题:

  

Microsoft环回适配器已在Windows 8和Windows Server 2012中重命名。新名称为“Microsoft KM-TEST环回适配器”。

     

解决

     

使用添加硬件向导手动添加网络适配器时,请选择制造商“Microsoft”并选择网络适配器“Microsoft KM-TEST环回适配器”。

如果这对您没有帮助,您可以尝试使用firefox guide进行录制。