ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
37 stars 4 forks source link

Failed to start the transport 'WebSockets' #4064

Open Omzig opened 2 hours ago

Omzig commented 2 hours ago

Description of Issue

i have 2 servers in a round robin NLB, i get this error:

[2024-11-18T15:39:00.852Z] Error: Failed to start the transport 'WebSockets': Error: WebSocket failed to connect. 
The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the 
connection ID is not present on the server, or there is a proxy blocking WebSockets. 
If you have multiple servers check that sticky sessions are enabled.

Version

5.0.15

Severity

High

Hosting Method

Nested IIS

Operating System

Windows

Database

SQL

Licensed

Yes

Features

No response

Additional Environment data

2 app servers 1 sql db 1 git repo

Screenshots/Animations

call stack of the error image

Omzig commented 2 hours ago

@adamdriscoll, let me know if you want me to create a support ticket on this one... :(

adamdriscoll commented 2 hours ago

@Omzig - What kind of load balancer? Are sticky sessions on?

Omzig commented 2 hours ago

sticky sessions

It is round robin. Trying to find out what kind, i assume it is dns round robin.

Sticky Sessions, i would say no.... do you have a preferred way to set it up? I was looking at the doc's and the SQL option looked cleaner than most.

adamdriscoll commented 2 hours ago

Sticky sessions are a requirement for web sockets for both the admin console and apps. It's usually set up via the load balancer configuration and not something done with PowerShell Universal. For example:

https://learn.microsoft.com/en-us/community/content/azure-configure-load-balancer-for-sticky-sessions

Round robin strategy is fine but once the connection is made it needs to stay with the node selected.

EDIT: It looks like some docs refer to it as session affinity.

Omzig commented 2 hours ago

OK! i am on it, tracking it up to an Azure LB

Omzig commented 2 hours ago

woohoo, i found it here: https://docs.powershelluniversal.com/config/hosting/high-availability#load-balancing

Side Note:

adamdriscoll commented 2 hours ago

Nope. Good catch. That doc needs a refresh.