My Application (React/Websocket) is returning ERR_CONNECTION_REFUSED
WebSocket connection to 'ws://127.0.0.1:8080/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
I already changed the port a few times but it does not help. Maybe someone here could provide some insight.
It may be that your server's firewall has blocked all of the ports that you have tried. To start I may suggest making sure that a) the react application is running and b) the firewall isn't blocking your required ports.
Also, Chrome may not allow unsecured websocket connections to the localhost. Perhaps try Firefox to test. If it works on Firefox but not Chrome, you'll need to swich from a
ws unsecured connection to
wss, which creates a secure connection. This means that you'll also need to proper security certificates on your server.
Any more detail that you can provide might help the community work you towards a solution!
Here is some screenshots. And already i try to change ws to wss and this get nothing. In Firefox i also get this error. I spend a lot of time to try to find a solution… Pls, can you help me? What else i can check?
I would suggest switching the loopback address to your Linode IP address to test my assumption.