WebSocketBundle
WebSocketBundle copied to clipboard
WebSocket connection to 'ws://IPDEVSERVER:8080/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED, ok on localhost
Hello ALL !
My project is ok on my local but i try to push my project on my dev server ...
this is my config.yml file gos_web_socket: server: port: 8080 #The port the socket server will listen on host: 127.0.0.1 #The host ip to bind to router: resources: - @ApplicationFrontFrontBundle/Resources/config/pubsub/routing.yml
So i launch my gos server like this
root@dev:/var/www/dev.xxxx.com/#php app/console gos:websocket:server
[2017-07-19 14:24:59] websocket.INFO: Starting web socket
[2017-07-19 14:24:59] websocket.INFO: Launching Ratchet on 127.0.0.1:8080 PID: 24474
Server seems to be ok but when i try to connect like this
var ws = WS.connect("ws://IPDEVSERVER:8080"); // i try also with hostname dev.** but same error ws.on("socket/connect", function(session){ });
I have error in my console WebSocket connection to 'ws://IPDEVSERVER:8080/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
I have check my firewall but there is nothing ( by journalctl -xe )
thx for your help !!! philou
Try binding to 0.0.0.0
thx BunnyHolder ! perfect !
thx bro !
Try binding to 0.0.0.0
@BunnyHolder Can you kindly explain what do you mean by binding to 0.0.0.0 ? I m using spring boot with angular. I serve the angular with ng server --host 0.0.0.0 and run my spring boot on a PC. On a different PC on the same network, i can render the angular app, everything is ok, i only get this same error regarding websocket "websocket connection to localhost:8080/api/socket" failed, error in connection establishment Kind regards,
Try binding to 0.0.0.0
I love u bro u saved me :)))))))
Hello!
I got the same error : I fix it by allowing the COOKIES in my web browser(Chrome for me).
Let me know if it worked for you
Try binding to 0.0.0.0
YEAH!!!!! It worked!! :)
@dataf3l @rasool707 What does mean by binding with 0.0.0.0
还是不行 springcloud
WebSocket connection to 'ws://192.168.1.13:9666/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
@bilalswiftsolutions https://github.com/thoughtbot/til/blob/master/docker/binding-to-0-0-0-0-in-rails.md
还是不行 springcloud
WebSocket connection to 'ws://192.168.1.13:9666/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
我也一样
还是不行 springcloud
WebSocket connection to 'ws://192.168.1.13:9666/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED我也一样
删除掉重新来,我就解决了