2
votes

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

1
Please Refer : stackoverflow.com/questions/10683853/… Question already asked.Helping Hands
I have already set the Parameter in jmeter property file still not workingDilip Kumar
Is server sending response properly?Helping Hands
Server sending the responseDilip Kumar
Server is sending the response but which format server has to sendDilip Kumar

1 Answers

1
votes

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).