Hello,
I've setup ARR via URL rewrite to forward requests to different backend servers based on the application path. The applications on one of those servers use websockets. Everything works okay as long as the server does not close the web socket. Connecting,
sending and receiving data and even a client side socket close will be handled correctly.
I've created a Failed Request Trace which indicates some read operations after the websocket has been closed.
74. | GENERAL_FLUSH_RESPONSE_END | BytesSent="348", ErrorCode="The operation completed successfully. (0x0)" |
75. | WEBSOCKET_SEND_CLOSE_START | Status="1000", Reason="session expired" |
76. | GENERAL_FLUSH_RESPONSE_START | |
77. | GENERAL_RESPONSE_ENTITY_BUFFER | Buffer="%88%11%03%E8" |
78. | GENERAL_RESPONSE_ENTITY_BUFFER | Buffer="session expired" |
79. | GENERAL_FLUSH_RESPONSE_END | BytesSent="19", ErrorCode="The operation completed successfully. |
80. | GENERAL_READ_ENTITY_END | BytesReceived="0", ErrorCode="The I/O operation has been aborted because of either a thread exit or an application request. (0x800703e3)" |
81. | WEBSOCKET_READ_FRAGMENT_END_NOT_SUCCESS | ErrorCode="The I/O operation has been aborted because of either a thread exit or an application request. (0x800703e3)" |
82. | GENERAL_REQUEST_END | BytesSent="1030", BytesReceived="677", HttpStatus="101", HttpSubStatus="0" |
Line 74 is the last sent message via server -> proxy -> client which succeeded.
Line 75 is the server side close of the websocket because the HTTP session timed out.
Line 80 performs some final read operations(?) on the already closed socket.
The currently installed used versions (DLL versions reported by resource monitor of the running w3wp.exe):
- rewrite.dll: 7.1.1993.2351
- requestRouter: 7.1.1988.0
- websocket.dll: 10.0.14393.0
- iiscore.dll: 10.0.14393.1532
Running on IIS10 (10.0.14393.0) on Windows Server 2016 (1607 14393.2724)
Do you have any ideas what is going on? Looks like a bug to me.
Below you can find a trace, when the client closed the connection.
37. | GENERAL_READ_ENTITY_END | BytesReceived="8", ErrorCode="The operation completed successfully. (0x0)" |
38. | GENERAL_REQUEST_ENTITY | Buffer="%88%82oA*%A2l%A8" |
39. | WEBSOCKET_RECEIVED_CLOSE | Status="1001", Reason="" |
40. | WEBSOCKET_READ_FRAGMENT_END_SUCCESS | BytesReceived="0" |
41. | WEBSOCKET_SEND_CLOSE_START | Status="1001", Reason="" |
42. | GENERAL_FLUSH_RESPONSE_START | |
43. | GENERAL_RESPONSE_ENTITY_BUFFER | Buffer="%88%02%03%E9" |
44. | GENERAL_FLUSH_RESPONSE_END | BytesSent="4", ErrorCode="The operation completed successfully. (0x0)" |
45. | GENERAL_FLUSH_RESPONSE_START | |
46. | GENERAL_FLUSH_RESPONSE_END | BytesSent="0", ErrorCode="The operation completed successfully. (0x0)" |
47. | GENERAL_REQUEST_END | BytesSent="284", BytesReceived="685", HttpStatus="101", HttpSubStatus="0" |
Thanks in advance.