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

WebSocketException: Handshake Status 200 when talking to a Tornadio server #21

Closed
derekmcloughlin opened this issue Jun 14, 2011 · 4 comments

Comments

@derekmcloughlin
Copy link

Hi,

I have a tornadio server used in a HTML/JS app working fine. I'd like to test this using a Python script using websocket-client.

When I connect to the example tornadio chatroom server using websocket-client as follows:

import websocket
ws = websocket.create_connection("ws://192.168.2.101:8001")

I get the following error:

WebSocketException: Handshake Status 200

I can see that the client is looking for a status of 101 back from the server but it gets 200. I can't see anywhere in tornadio or tornado where it would get back a 101.

Any suggestions as to where to look would be appreciated.

Derek.

@mrjoes
Copy link
Owner

mrjoes commented Jun 14, 2011

Hi,

That's happening because you're trying to access base router instead
of the websocket transport. Socket.io differentiates between
transports by using different URLs.

So, try opening "ws://192.168.2.101:8001/chat/websocket/" instead,
where "chat" is your resource name.

Serge.

On Tue, Jun 14, 2011 at 2:06 PM, derekmcloughlin
reply@reply.github.com
wrote:

Hi,

I have a tornadio server used in a HTML/JS app working fine. I'd like to test this using a Python script using websocket-client.

When I connect to the example tornadio chatroom server using websocket-client as follows:

import websocket
ws = websocket.create_connection("ws://192.168.2.101:8001")

I get the following error:

WebSocketException: Handshake Status 200

I can see that the client is looking for a status of 101 back from the server but it gets 200.  I can't see anywhere in tornadio or tornado where it would get back a 101.

Any suggestions as to where to look would be appreciated.

Derek.

Reply to this email directly or view it on GitHub:
#21

@derekmcloughlin
Copy link
Author

Thanks Serge. That worked perfectly.

@gowthamyaal
Copy link

gowthamyaal commented Aug 10, 2018

I am using Socket io with node js, its working fine in local but facing issue while trying in AWS, its a video conferencing app, the issue i am facing is the screens are not sharing.
image

the above image is captured while working in AWS, its an issue.
the below image is captured in local and is working fine.

image

@vinothkumarfenfeo
Copy link

Hi,
I am also facing same issue when i tried to connect web socket, the issue is "Handshake status 200 OK",
My code is:
import websocket from websocket._exceptions
import WebSocketConnectionClosedException

ws = websocket.create_connection("ws://dev.charger.com/chargerWebService/connect/")

here
"dev.charger.com" is my domain,
"chargerWebService/connect/" is my path

I get this error like "Handshake status 200 OK"

where do i want add resource name and where do i want add "websocket" in the url

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

4 participants