Skip to content

No Available Server Connexion #225

Open
@Naowo

Description

@Naowo

Hello,

I'm trying to use the AzureSignalR Service in azure, with my own negociation endpoint, I'm using the sample that can be found here :

I have a client app (angular), wich is configured to connect on my SignalR with the following code : 

this.hubConnection = new HubConnectionBuilder()
        .withUrl(`[https://negotiationserver20230424040158.azurewebsites.net/message`] 
        (https://negociationserver*********.azurewebsites.net/message), signalROptions)
        .build();

"signalROptions" look's like this : 

const signalROptions = {
        logging : LogLevel.Critical,
        accessTokenFactory : () => this.msalService.getTokenForScopes(this.msalService.getScopesForEndpoint(this.appConfig.apiEndpoints.contracts)),
      } as IHttpConnectionOptions

At this point everything works well, the negociation works as it's suppose to work, the app make a POST HTTP Request on my own negociation server, my negociation server is doing the "negociateAsync" (the method exposed by the ServiceHubContext Object), the azure signalR service response to this request with the signalR service url & an access token. My negociation endpoint is responding to my client with this 2 informations, then my Angular App is handling this response and make a new negociate call this time on the azure signalR service, the negociation is passing, no problems there in the app log I see a log wich indicate the web socket connexion is established.

Some secondes later (5 secondes max), I can see the following error push to the client in the websocket : 
Error: Server returned handshake error: SignalR Service is now in 'Default' service mode. Current mode works as a proxy that routes client traffic to the connected app servers. However app servers are not connected.

This exception fired by the azure Signal R service is this one : NoAvailableServerConnection wich close the websocket connection on my client App.

I have tried so many things, hosting the negociation on azure in same region and the same resource group of my azure signalR service, add/remove "addSignalR", "addAzureSignalR" & "MapHub" or put the ServiceTransportType on Persistent mode, but that's does not solve the problem.

So at this point I'm stuck with the error and no solutions to solve it. 
Have you any advises to help me fix it ?

Thank's for your reading. 
Have a nice day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions