WebSocket Ping/Pong,Websocket error,WebSocket error: java.net.SocketException: Connection reset by peer: socket write error.

Issue #19 closed
NA8358 created an issue

Capture.PNG

Issue: we are facing issue that all the users gets disconnected after some time with exception: "WebSocket Ping/Pong,Websocket error,WebSocket error: java.net.SocketException: Connection reset by peer: socket write error" , if the no. of response in ping are high.

Comments (6)

  1. Peter Doornbosch repo owner

    "Connection reset by peer" means that the other end has closed the connection. This can have multiple causes, e.g. your server not being able to handle the load, or a load-balancer that for some reason decides to close the connection, etc. If the connection is closed, it's okay for the plugin to throw an exception saying that it cannot send any more data.

    My advise is to first investigate what the cause of the problem might be. E.g. check your server log files, add some more debugging info, and so on. Remember the plugin is open source; you can use the source for debugging or add some more logging for yourself that might help you to track down the problem. You might even capture data send on the line with WireShark or similar tool to find out what is going on.

    If you're still sure it's a bug in the plugin, please provide me at least with some information that points in that direction.

    Cheers, Peter

  2. NA8358 reporter

    Thanks for this plugin and your support.

    is ping/pong sampler is same as empty request/response sampler?

  3. Peter Doornbosch repo owner

    Not exactly. The WebSocket protocol is sending frames, there are different kinds of frames (text, binary, close, ping, pong, ....). Request/response sampler is sending text or binary frames (depends on what type of data you select in sampler gui). The ping/pong sampler is sending a ping frame and expecting to receive a pong frame. The WebSocket protocol allows sending payload data with a ping frame (which one might expect will be echoed in the pong frame), but my plugin currently does not support this (would be easy to add though). Ping/pong is used to prevent firewalls and other network equipment on the line, from closing your connection when there is not much traffic.

  4. Peter Doornbosch repo owner

    For me, it's not clear what kind of enhancement or improvement you want. If the other end (the peer) closes the connection without sending a close frame first, this is a protocol error (caused by the peer) and the plugin should signal this. Compare with a normal HTTP request: if the web-server is not returning an answer, the HTTP-sampler will be unsuccessful.

  5. Log in to comment