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
IIS reverse proxy #1192
Comments
I'm not seeing anything wrong with what you describe. The exception shown by websockets suggests that IIS closed the TCP connection. However, we don't know why. Perhaps turning on debug logs would give you a clue? At worst, you can figure out which side closed the TCP connection with Wireshark, but that's pretty low level. |
Here is the output with debug after a client attempts to connect:
Does this give any useful information? Please note that IIS proxy works well with two different websocket servers that I tried (python simple-websockets-server module , and a Node.js server). That is why I think my IIS setting configurations are fine. |
I asked this question in stack overflow. Some people tried it and got the same results. There could be potentially an issue in the module. |
... the minor issue being that "one of the developers" is probably "me" and I don't have a Windows install around nor knowledge of IIS :-( Typically, cases of "$SETUP works with $LIBRARY but not websockets" happen because websockets provides more features than $LIBRARY, breaking $SETUP. Let's try the most frequent offender -- could you add ...
async with websockets.serve(echo, "localhost", 5005, compression=None):
... and see if that helps? This old stackoverflow question suggests that IIS disliskes compression on WebSocket connections. |
Thanks @aaugustin for the solution. With that parameter set to off, it works just fine. |
Good to hear that it's resolved! |
My goal is to run a websocket server in local host and the clients access it via Windows Web Server IIS acting as a reverse proxy server.
Server runs at
localhost:5005
as shown below:Then in IIS:
app
Now a client should be able to connect from
ws://localhost/app
. However connection fails and I get this exception in server:To make sure if IIS settings are correct, I used another websocket library named "simple-websocket-server" and it worked fine. Here is the server implementation:
Can anyone tell me what the issue is?
I tried both an html client and a python client (unsuccessful with websockets module, successful with simple-websocket-server module).
Thank you
The text was updated successfully, but these errors were encountered: