https://bz.apache.org/bugzilla/show_bug.cgi?id=65034

--- Comment #14 from Felix Schumacher <felix.schumac...@internetallee.de> ---
In my tests, I used netcat to simulate a server:

  date | netcat -l 127.0.0.1 1234

and used a TCP Sampler to read from that 'server'.

In my first try, the test didn't end, as I specified no timeout for the read
operation. When I did, I got the following exception in the log file (nightly
build):

2020-12-29 10:36:40,937 ERROR o.a.j.p.t.s.TCPSampler: 
org.apache.jmeter.protocol.tcp.sampler.ReadException: 
        at
org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.read(BinaryTCPClientImpl.java:143)
~[ApacheJMeter_tcp.jar:5.4.1-SNAPSHOT]
        at
org.apache.jmeter.protocol.tcp.sampler.TCPSampler.sample(TCPSampler.java:398)
[ApacheJMeter_tcp.jar:5.4.1-SNAPSHOT]
        at
org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638)
[ApacheJMeter_core.jar:5.4.1-SNAPSHOT]
        at
org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
[ApacheJMeter_core.jar:5.4.1-SNAPSHOT]
        at
org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
[ApacheJMeter_core.jar:5.4.1-SNAPSHOT]
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
[ApacheJMeter_core.jar:5.4.1-SNAPSHOT]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_201]
        at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
~[?:1.8.0_201]
        at java.net.SocketInputStream.read(SocketInputStream.java:171)
~[?:1.8.0_201]
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
~[?:1.8.0_201]
        at java.net.SocketInputStream.read(SocketInputStream.java:127)
~[?:1.8.0_201]
        at
org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.read(BinaryTCPClientImpl.java:126)
~[ApacheJMeter_tcp.jar:5.4.1-SNAPSHOT]
        ... 6 more

The end of stream is signalled with a SocketTimeoutException (which is an
IOException). In earlier versions, we swallowed the SocketTimeoutException
silently. In the newer version, we convert them to a ReadException.

This is, what is hitting you (I suspect). Now, the question remains, what to do
here.

I think, we can swallow the SocketTimeoutException in the case, when no
EOM-Byte is set. That way, your issue should be gone and those, who can use an
EOM-Byte will get notified, when the stream ended early.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to