我在Akka IO中创建了TCP服务器的示例项目(源代码在https://github.com/lordjoker/akkatcp中),该项目在端口9099上运行。在负载测试期间,发生了例如发送1000个相同请求以[RST,ACK]结尾的情况,该请求复位TCP连接。在客户端,我有以下异常:
org.apache.jmeter.protocol.tcp.sampler.ReadException:
at org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.read(BinaryTCPClientImpl.java:152) ~[ApacheJMeter_tcp.jar:4.0 r1823414]
at org.apache.jmeter.protocol.tcp.sampler.TCPSampler.sample(TCPSampler.java:402) [ApacheJMeter_tcp.jar:4.0 r1823414]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416) [ApacheJMeter_core.jar:4.0 r1823414]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250) [ApacheJMeter_core.jar:4.0 r1823414]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[?:1.8.0_172]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_172]
at java.net.SocketInputStream.read(SocketInputStream.java:127) ~[?:1.8.0_172]
at org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.read(BinaryTCPClientImpl.java:134) ~[ApacheJMeter_tcp.jar:4.0 r1823414]
... 5 more
我不知道为什么?