linnovate / mean-socket

6 stars 5 forks source link

mean.io socket not working on server #7

Open Prateek479 opened 9 years ago

Prateek479 commented 9 years ago

Hi I use the mean socket package , it works fine on my local system but on server it throughs error

WebSocket connection to 'ws://ip.ip.ip.ip:3000/socket.io/?EIO=2&transport=websocket&sid=Ja9UDR8v1rCoHTKUAAAN' failed: Connection closed before receiving a handshake response

POST http://ip.ip.ip.ip:3000/socket.io/?EIO=2&transport=polling&t=1423493734491-8&sid=Ja9UDR8v1rCoHTKUAAAN 400 (Bad Request)

Response to the request mention above is { "code": 1, "message": "Session ID unknown" }

Prateek479 commented 9 years ago

Hi after browsing a bit about the error , I found that mean.io use clusters in production mode and due to this there is a sticky section , can read in detail about this here (http://socket.io/docs/using-multiple-nodes/)

A solution for this already there , we just need to integrate (https://github.com/indutny/sticky-session) .

I will try to create a pull request for the same soon :)

liorkesos commented 9 years ago

Cool Nice catch! Lior

On Tue, Mar 10, 2015 at 10:12 AM, Prateek Ojha notifications@github.com wrote:

Hi after browsing a bit about the error , I found that mean.io use clusters in production mode and due to this there is a sticky section , can read in dtail about this here (http://socket.io/docs/using-multiple-nodes/ )

A solution for this already there for this we just need to integrate ( https://github.com/indutny/sticky-session) .

I will try to create a pull request for the same soon :)

— Reply to this email directly or view it on GitHub https://github.com/linnovate/mean-socket/issues/7#issuecomment-78011029.

Lior Kesos - http://www.linnovate.net Linnovate - Community Infrastructure Care mail: lior@linnovate.net office: +972 722500881 cell: +972 524305252 skype: liorkesos

thilojith commented 8 years ago

Can anyone help me to integrate stricky-session in meanio?