好奇猫 发表于 2017-6-13 11:37:29

jmeter tcp协议相关问题

在采用jmeter进行tcp协议进行接口测试时报如下错误:
Thread Name: 线程组 1-1
Sample Start: 2017-06-13 11:23:50 CST
Load time: 10018
Connect Time: 0
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code: 500
Response message: org.apache.jmeter.protocol.tcp.sampler.ReadException:

Response headers:


SampleResult fields:
ContentType:
DataEncoding: GBK

请求为:
0D0000001A080117052515173231
查找资料   已经修改配置文件tcp.handler=BinaryTCPClientImpl,并且在取样器前面添加org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl,但是还是出现上述错误。

fhhh_eyou 发表于 2017-6-13 11:37:30

1.SocketException: Socket closed
2.关闭资源

好奇猫 发表于 2017-6-13 11:43:14

另 jmeter错误日志如下2017/06/13 11:44:04 ERROR - jmeter.protocol.tcp.sampler.TCPSampler:org.apache.jmeter.protocol.tcp.sampler.ReadException:
        at org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.read(BinaryTCPClientImpl.java:140)
        at org.apache.jmeter.protocol.tcp.sampler.TCPSampler.sample(TCPSampler.java:414)
        at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Socket closed
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.read(BinaryTCPClientImpl.java:126)
        ... 4 more

2017/06/13 11:44:04 WARN- jmeter.util.JMeterUtils: Interrupted in thread 线程组 1-1 java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:503)
        at java.awt.EventQueue.invokeAndWait(Unknown Source)
        at java.awt.EventQueue.invokeAndWait(Unknown Source)
        at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
        at org.apache.jmeter.util.JMeterUtils.runSafe(JMeterUtils.java:1322)
        at org.apache.jmeter.visualizers.StatVisualizer.add(StatVisualizer.java:119)
        at org.apache.jmeter.reporters.ResultCollector.sendToVisualizer(ResultCollector.java:595)
        at org.apache.jmeter.reporters.ResultCollector.sampleOccurred(ResultCollector.java:571)
        at org.apache.jmeter.threads.ListenerNotifier.notifyListeners(ListenerNotifier.java:84)
        at org.apache.jmeter.threads.JMeterThread.notifyListeners(JMeterThread.java:796)
        at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:456)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
        at java.lang.Thread.run(Unknown Source)

好奇猫 发表于 2017-6-13 14:25:30

fhhh_eyou 发表于 2017-6-13 12:04
1.SocketException: Socket closed
2.关闭资源

但是,我的数据并没有发送到服务器端,设置延时10s钟也一样,通道打开了,但是请求数据发送不了
页: [1]
查看完整版本: jmeter tcp协议相关问题