websocket request and response is not working using existing connection option

Issue #31 closed
Former user created an issue

Hello,

I am using JMeterWebSocketSamplers-0.9. I have a push sever which will first connect and give me "uaid": "c1479b573c3a421894b3892430038ae9",Using the same i used regular extractor and same have to used in next web socket request data. I using J Son fort he same.

in the first request using json {"messageType":"hello", "use_webpush":true, "uaid":"", "channelID":""} i am able to get proper response i.e {"messageType": "hello", "uaid": "9bb33d08ee8648309487bd3bda464948", "status": 200, "use_webpush": true, "env": "development"}. but using the same connection when i tried to run Json as {"messageType":"register", "channelID": "6ee3a53b-967f-447e-8814-c9af0da6c99e”, "uaid":"${uaid}"}. Second web socket request and response sample failing with error message as "Error Count: 1 Data type ("text"|"bin"|""): Response code: Sampler error: unexpected frame type. Response message: Received: Close frame with status code null and close reason 'null'.

Kindly help.Thanks in advance.

Comments (3)

  1. Peter Doornbosch repo owner

    Hi,

    What is happening, is that your server is sending a websocket close frame, so apparently, your server wants to close the connection. Unfortunate for you, as you are expecting an answer to your (2nd) request, but that's how it is!

    The sampler is failing, because it did not receive the expected response. And by the way, as a close frame was sent by the server, it never will receive the expected response anymore.

    You should investigate why your server wants to close the websocket connection. Maybe the request you are sending contains an error? Try to find more information in the server logs, or compare the message sent and received with the message exchange of a "real" client.

  2. Log in to comment