Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https socket.io + pm2 cluster = Connection closed before receiving a handshake response #974

Closed
geekyme opened this issue Jan 29, 2015 · 5 comments

Comments

@geekyme
Copy link

geekyme commented Jan 29, 2015

My chat server is running an express + socket.io setup. They listen on https port 8443. I do not have an nginx to route to 8443 and that is ok.

I use pm2 to run a cluster mode on 2 CPUs.

Now when a client attempts to connect to my chat server, he gets

WebSocket connection to 'wss://chat.abctest.com:8443/socket.io/?EIO=3&transport=websocket&sid=f3bvw3rY1cRf1YkCAAAA' failed: Connection closed before receiving a handshake response

There is nothing peculiar in the logs that indicates this failure.

Now when I run pm2 in fork mode, the client no longer sees that error.

Please help.

@soyuka
Copy link
Collaborator

soyuka commented Jan 29, 2015

node version ? pm2 version ?

@geekyme
Copy link
Author

geekyme commented Jan 29, 2015

node v0.11.15, pm2 12.3

@geekyme
Copy link
Author

geekyme commented Jan 29, 2015

i thought it was related to this problem and i tried including that library but it didnt work too. https://github.com/indutny/sticky-session

@soyuka
Copy link
Collaborator

soyuka commented Jan 29, 2015

#389

@geekyme
Copy link
Author

geekyme commented Jan 29, 2015

ok will follow the above discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants