SignalR - Swarm commnication issue

I have a docker swarm with 3 nodes. In windows, node ı have an aspnet web API Project that works in Microsoft/IIS based image. Normally when ı work on IIS my projects works fine. However to put them into. docker swarm. my signalR has broken. I use signalR on the server-side for send data to client-side then I have code like this

  var hubConnection = new HubConnection("http://api.mydomain.com");
        IHubProxy stockTickerHubProxy = hubConnection.CreateHubProxy("MyHub");
      
        await hubConnection.Start(new LongPollingTransport());

        stockTickerHubProxy.Invoke("RefreshData", ID); 

I use Traefik for proxy and using let's encrypt SSL certificates. Normally when this on IIS, the hub could create the connection with subdomain and stars the connection.

But now ı m having an issue like this

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond MYmasterNodeIp:433"(this is my master node's IP address it's a Linux VM and Traefik is on the master node for forwarding request to the services ).

I tried lots of things but I couldn't achieve to connect signalR with my API. Everything works perfectly except signalR hub connection on my services. Can anyone help me?

Hello @kamuranborsa,

Are you able to provide any logs from Traefik while these requests are being made?

Also, are you attempting to use LetsEncrypt certificates for an IP-based connection?

Thank you for replying..

  • I selected Log Lvl is "debug" in treafik and I could not see anything about the signalr in logs.
  • Yes I use LetsEncrypt certificates for an IP-based connection
    I waste a few days for this situation than ı could not find a solution yet .

I 'm still working on this issue.. Have you got any suggestions?