By Guest on Friday, 19 December 2025
Posted in General
Replies 5
Likes 0
Views 399
Votes 0
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.
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
·
2 weeks ago
·
0 Likes
·
0 Votes
·
0 Comments
·
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.
·
2 weeks ago
·
0 Likes
·
0 Votes
·
0 Comments
·
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
·
2 weeks ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Con esa propiedad y las librerías ssleay32 y libeay32 ha funcionado.

¡Gracias!
·
1 week ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Thanks for the feedback.

Kind Regards,
Sergio
·
1 week ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post