Sending large binary message fails with Broken pipe error

Issue #60 closed
Former user created an issue

Hello, I am trying to send a large binary message using the "Websocket single write sampler".

I've converted a small wav (4 seconds) into the binary format (e.g. 0xaa 0xbb...) and copied the data into the field Data>Request data choosing the Binary format.

This caused a few issues:

  1. the data in the Request data edit box look distorted (see attachment).
  2. the response error says : "Response code: Websocket I/O error Response message: WebSocket I/O error: java.net.SocketException: Broken pipe (Write failed)"

When I try to send just the beginning of the file (like 10%), the sampler works fine.

Do you have any tips on how to deal with large binary payloads like that? Perhaps an internal fragmentation of the request data needs to be turned on?

I've attached the hex file which I am trying to send as well.

Thanks

Comments (7)

  1. Peter Doornbosch repo owner

    Hi,

    Thanks for the feedback. W.r.t. the broken pipe issue: it's hard to tell what happens exactly. It could be that your server somehow does not accept such large messages. Did you check the server logs? And can you check (or post) the jmeter.log, maybe that contains some more useful info too.

    You are right that fragmenting (splitting up the message over several websocket frames) might help, but unfortunately, the plugin does not (yet) support that (it does support continuation frames, but only as a receiver).

    The distorted view is kinda funny, i've never seen that before; i'll look into it.

    Cheers, Peter

  2. Petra Vanickova

    It was a server limitation of the frame and message size indeed. After increasing it from the default 64KB to 64MB, the message is sent correctly.

    Thanks for the tip.

    Would you prefer to track the request for improvement - outgoing message fragmentation with configurable frame size limit - as a separate issue or can I leave it here?

    Also I'd like to suggest adding a note to the documentation about how to create the needed binary format from a file in shell:

    hexdump -e '16/1 "0x%02x " " "' myFile.wav
    

    Regards, Petra

  3. Peter Doornbosch repo owner

    Hi Petra,

    Yes, please create a separate issue for the improvement.

    I tried to reproduce the "distorted edit box", but no luck so far. Which java version are you running?

  4. Petra Vanickova

    Hi Peter, I am using the following java version (running on Ubuntu 17.10):

    java-9-oracle java 9.0.4 Java(TM) SE Runtime Environment (build 9.0.4+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

    and JMeter version: 4.0 r1823414

    Regards Petra

  5. Petra Vanickova

    I've tried to copy the text in another jmeter element (if condition) and the overlap appears there as well so it must be a problem in my environment in general rather than the websocket plugin itself.

    It's probably not worth investigation from your side. Thanks for your time.

    Petra

  6. Peter Doornbosch repo owner

    Hi Petra,

    Ok, thanks a lot for checking.

    Again, thanks for your valuable feedback. The idea about reading the binary content from file also crossed my mind when i tested the GUI with your sample data ;-).

    Regards Peter

  7. Log in to comment