SignalR - The operation identifier is not valid

0

I have docker container with asp.net core app webapi including signalr -> everything is working fine when I am running it on my local machine, events are dispatched with no problems and clients are receiving it. However problem starts when I deploy this container to amazon behind loadbalancer. Now when even trying to connect to the hub i get following exception stack

await this.hubConnection.StartAsync()

results in

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.WebSockets.WinRTWebSocket.<ConnectAsync>d__31.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.WebSockets.WebSocketHandle.<ConnectAsyncCore>d__19.MoveNext()

The operation identifier is not valid. (Exception from HRESULT: 0x800710DD)

any advice? Should I include Redis? I would understand if this will happen when trying to dispatch messages outside of hub, but why its on connect? Can you point me what i am doing wrong or maybe how to fix it?

the js code results in error too:

WebSocket connection to 'wss://***id=e80925b5-d15c-42b3-8ae3-649e1f82e05d' failed: Error during WebSocket handshake: Unexpected response code: 204
amazon-web-services
amazon-ec2
signalr
asp.net-core-signalr
asked on Stack Overflow Dec 14, 2017 by Ivan • edited Dec 14, 2017 by Ivan

1 Answer

0

Ok, problem was our load balancer was not publishing TCP ports , just HTTP, publishing TCP ports fixed the issue.

answered on Stack Overflow Dec 15, 2017 by Ivan

User contributions licensed under CC BY-SA 3.0