WebSocket connection failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET

Hi Everyone,

I need to set up a proxy server to record a script from JMeter. When running the server as usual, and connect to host_IP:8080 I can login and I can see that the "Proxy is activated " on the server (meaning that the docker image is loaded), although as soon as the application page shows up, it gets grey and I get an error (In devtools under console).
(Still the shinyProxy server doesn’t end it , although it is actually disconnected)

How can I setup the proxyserver on port 8888 and still be able to interact with the server with no error?

Here is the error when I get the grey screen:

WebSocket connection to ‘ws://’ failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
(anonymous) @ shinyapp.js:83
createSocket @ shinyapp.js:86
connect @ shinyapp.js:36
initShiny @ init_shiny.js:551

Thanks for your help and attention,


I found the cause of the problem.
I was recording HTTP requests with JMeter, although at some point the communication will be through a websocket. For some reason some browsers block this connection and the websocket request.
I finally found that a web socket request should be sent and when you see this error, try to use a fresh installed browser otherwise the Network monitor may not show you the websocket request as the last action.
There are special addons for websocket requests in JMeter and here is the link to a reference to learn more about it:

Now I know that the problem was not the JMeter recorder, the shinyproxy application, the proxy problems, or the docker containers, it was a web service blocking that for some reason is happening. If you see the ws request, get the server, path, and the port to create the connection using the “websocket open connection” and find the request (data in json format), to use it with the “websocket-request-response sampler” in JMeter. The sampler accepts binary and text as data, select text and paste the json data (raw format) in it.

Good luck with monitoring your ShinyProxy application and a big thanks to the ShinyProxy team for making this so easy to publish our Shiny applications.

Kind regards,