We are running JMeter for connecting TCP Socket thorugh BinaryTCPClientImpl , We are getting the response code : 500
Response message: org.apache.jmeter.protocol.tcp.sampler.ReadException
JMeter Version : 2.9
Help out
We are running JMeter for connecting TCP Socket thorugh BinaryTCPClientImpl , We are getting the response code : 500
Response message: org.apache.jmeter.protocol.tcp.sampler.ReadException
JMeter Version : 2.9
Help out
If this is the error
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:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)
then you have 2 options. The first (and much easier if it applies to you) is to use the LengthPrefixedBinaryTCPClientImpl. If this applies to you, that is, if your responses are always the same fixed sizes, you can simply set the tcp.binarylength.prefix.length property and go about your business. If that is not the case, then your other option is to extend org.apache.jmeter.protocol.tcp.sampler.TCPClient. It may help to get in touch with the client team of this proprietary protocol, because after all, they have implemented something that works. You'll probably have to extend it to look something like LengthPrefixedBinaryTCPClientImpl read N bytes. Although, this runs the risks of reading too many or too few bytes. If your application server ever miscalculates the size of it's output, you suffer the consequences by getting another timeout or leaving extra bytes in the buffer and reading them on the next iteration (and then cascading errors).