ISO8583 LengthPrefixedBinaryTCPClientImpl does not support standard message
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
### Expected behavior
Given a ISO8583 ASCII standard health check message: `00670800822000000800000004000000000000000409111530088001909916088001081`
And
Setting up TCP Sampler to use: `LengthPrefixedBinaryTCPClientImpl` with config: `tcp.binarylength.prefix.length = 4`
Then: TCP Sampler should be able to determine whether the message is ready or no.
### Actual behavior
For Response: `00690810822000000A0000000400000000000000040911153008800190991608800100081`
```
2023-09-26 09:54:47,366 ERROR o.a.j.p.t.s.TCPSampler:
java.lang.IllegalArgumentException: Hex-encoded binary string contains an uneven no. of digits
at org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.hexStringToByteArray(BinaryTCPClientImpl.java:78) ~[ApacheJMeter_tcp.jar:5.6.2]
at org.apache.jmeter.protocol.tcp.sampler.BinaryTCPClientImpl.write(BinaryTCPClientImpl.java:90) ~[ApacheJMeter_tcp.jar:5.6.2]
at org.apache.jmeter.protocol.tcp.sampler.LengthPrefixedBinaryTCPClientImpl.write(LengthPrefixedBinaryTCPClientImpl.java:59) ~[ApacheJMeter_tcp.jar:5.6.2]
at org.apache.jmeter.protocol.tcp.sampler.TCPSampler.sample(TCPSampler.java:397) [ApacheJMeter_tcp.jar:5.6.2]
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:651) [ApacheJMeter_core.jar:5.6.2]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:570) [ApacheJMeter_core.jar:5.6.2]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:501) [ApacheJMeter_core.jar:5.6.2]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:268) [ApacheJMeter_core.jar:5.6.2]
```
### Steps to reproduce the problem
1 - Clone this project: https://github.com/gdiazs/demo-iso8583
It is a server socket on top netty. Just run the main: **com.example.Main.**
2- Then in same repo there is a JMX script file : **ISO Performance.jmx** import to JMeter.
Make sure port 5000 is not being used by another process.
3 - Open JMeter's Log viewer and run script
4 - log messages shows up, request and response does not work.
NOTE:
Work around
- Happy Path:
On TCP sampler remove LengthPrefixedBinaryTCPClientImpl, then TCP implementation by default is setup, configure read timeout 1000 or 3000, then success output is faced.
### JMeter Version
17.0.8
### Java Version
11
### OS Version
MAC M1
Contributor guide
Assessment
This issue has not been assessed yet.