0
votes

I am using a plugin (WebSocket Samplers by Peter Doornbosch) to establish the WebSocket connection in JMeter and trying to send the request message over it but receiving below error in logs

ERROR - eu.luminis.jmeter.wssampler.RequestResponseWebSocketSampler: Unexpected frame type received in sampler 'WebSocket request-response Sampler': Close frame with status code null and close reason 'null'

My test plan consists of "WebSocket Open Connection", "Web-socket request-response sampler" and "web-socket ping/pong frame filter". And I feel there is no issue in establishing the connection but something is wrong while sending the request or receiving a response.

Also, tried checking the logs from the server but didn't find any requests which were sent using JMeter.

Implemented another available plugin too in Jmeter to test the WebSocket but seeing similar behavior. Any help would be highly appreciated.

2

2 Answers

1
votes

It looks like you're using the wrong sampler type, looking into the error you're getting it makes more sense to use single-write sampler which is designed for sending one (text or binary) WebSocket frame.

You might want to use a sniffer tool like Fiddler or Wireshark to capture the traffic between your browser (or application) and the backend and see what types of frames are going, which direction, is single connection re-used or each time new one is established, etc.

You may also find the following links useful:

0
votes

The problem is that your server is actively closing the connection. Usually, this is caused by the client sending a request that the server does not understand. In your case, it's very likely that the request you are sending in the request-response sampler is not accepted by the server. As Dmitri suggests, the best way to find out how a "normal" client communicates with the server is to capture a session with WireShark and model your testplan accordingly. Hth.