Friday, 19 December 2025
  3 Replies
  91 Visits
  Subscribe
Hello,

I have the following setup:
- A hub installed on two servers.
- A load balancer that redirects the connection to one of the two servers.
- A Delphi desktop application using the EseCeGe libraries as a client that connects to the hub:
If I connect directly to one of the servers, it works correctly.
If I connect to the load balancer, it fails to connect.

I have another application in .NET, and it connects correctly when connected to the load balancer.


I use those classes:
...Create(const AURL, AHub: string);
begin
WsClient := TsgcWebSocketClient.Create( nil );
SignalR := TsgcWSAPI_SignalRCore.Create( nil );
SignalR.Client := WSClient;
WSClient.URL := AURL;
SignalR.SignalRCore.Hub := AHub;
SignalR.SignalRCore.Authentication.Enabled := True;
SignalR.SignalRCore.Authentication.TokenParam := srctHeader;
SignalR.SignalRCore.Authentication.Authentication := srcaSetToken;
end;

I have auth by JWT

....BeforeConnect;
begin
SignalR.SignalRCore.Authentication.SetToken.Token := AuthenticationTokenManager.GetToken;
end;

If you have any similar cases with a load balancer and know if any properties might be missing, please let me know.

Or if any properties in your libraries could be specified for these cases.

Thank you very much.
6 days ago
·
#2384
Hi,

I'm sorry but I've never tested signalr through a Load balancer, it should work without changes but maybe it requires an extra configuration.
Please enable the Log property in the TsgcWebSocketClient and send me the log file with a successful connection when connecting directly to the server and when fails connecting to the load balancer.
If you can provide the logs of a successful connection using the .net client to the load balancer it will help too.

Kind Regards,
Sergio
6 days ago
·
#2385
Buenas,

Tengo mas informacion
La conexión que funciona es http y cuando lanzo al balanceador es https. ¿Quizá sea por el https?

El error que me da al conectar es este:
ExceptionMessage="Socket Error # 10054
Connection reset by peer."

Un saludo.
5 days ago
·
#2386
Hola,

SignalR utiliza una conexión http/s para negociar la conexión, si la conexión inicial es https debe definir la propiedad del componente TsgcWebSocketClient.TLS := True para que utilice https.

Saludos,
Sergio
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf,pas,dfm,dpr,dproj,dpk,txt,log
· Insert · Remove
  Upload Files (Maximum 10MB)