Hi Oliver,
This is not an issue on JMeter, but on the WebSocket plugins, so better
to open ticket on the WS project (perhaps can be an issue on the
webserver websocket implementation)
For WS by Peter, perhaps arround this code:
https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/src/main/java/eu/luminis/websocket/Frame.java
You can explain your issue here:
https://bitbucket.org/pjtr/jmeter-websocket-samplers/issues?status=new&status=open
Milamber
On 10/05/2023 18:05, Oliver Weiler wrote:
First time poster here, please let me know if I'm missing anything to help
diagnose this...
I believe I've found an issue but wasn't sure exactly where. It has to do with
using websockets. I know that the websocket feature is enabled using
additional plugins but I've tried two websocket plugins and found that they
both act exactly the same way suggesting (though not conclusively) that this
may be an issue inside jmeter.
My issue is that large websocket responses from our web socket based service
are truncated to 4096 bytes. That number seems suspicious in that it's
obviously exactly 4k.
The two plugins I've tried using are:
https://bitbucket.org/pjtr/jmeter-websocket-samplers/branches
and
https://github.com/fshutdown/JMeter-WebSocketSampler
You can find my sample JMX file here:
https://agcloud.auto-graphics.com/index.php/s/BbFZrIdaiFcL4p3/download
That JMX file has both samplers configured but only the "jmeter-websocket-samplers" is enabled. To switch to
the other websocket plugin, disable the samplers where the name starts with "WS ", then enable the samplers
where the name starts with "NWS ". In both cases, the "Retrieve Results number 1" sampler gets
truncated as evidenced by the fact that the returning JSON is badly formed and the trailing bytes show a field that's
cut off in midstream.
While I'm not a developer, I can read code and make some rudimentary changes. As a crazy
test, I downloaded the source to jmeter and replaced any occurrence of "4096"
that looked like it could be buffer size related and changed it to 16384. To that end, I
modified the below using a copy of the source I downloaded yesterday (May 9th, 2023):
src/core/src/main/java/org/apache/jmeter/save/converters/SampleResultConverter.java
lines 461 and 462
src/jorphan/src/main/java/org/apache/jorphan/util/JOrphanUtils.java line 45
src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPFileImpl.java
line 55
src/protocol/tcp/src/main/java/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImpl.java
line 124
src/protocol/tcp/src/main/java/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java
line 103
Building using the above modifications had no effect on my truncated web socket
data.
At this point, I'm out of my league and am asking for help. For environment
information, I'm running jmeter v5.5. java --version, produces this output:
openjdk 13.0.2 2020-01-14
OpenJDK Runtime Environment (build 13.0.2+8)
OpenJDK 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
The host OS is Windows 10 Pro, Version 22H2, OS Build 19045.2846.
Any help would be greatly appreciated.
Oliver Weiler
Director of IT
O: (909) 569-1542 | C: (909) 753-9277 | o...@auto-graphics.com
15218 Summit Ave, Suite 300, Box #240
Fontana, CA 92336
________________________________
The contents of this e-mail and any attachments are intended solely for the
use of the named addressee(s) and may contain confidential and/or privileged
information. Any unauthorized use, copying, disclosure, or distribution of the
contents of this e-mail is strictly prohibited by the sender and may be
unlawful. If you are not the intended recipient, please notify the sender
immediately and delete this e-mail.