-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Available Server Connexion #225
Comments
From the error message, you don't have a SignalR server to handle the client connections (see this doc for more details). Could you elaborate a bit more on how your negotiation server works (from what you have described I cannot easily tell)? If your negotiation server just generates url and access token for clients but does not connect to SignalR service, you will see this error in default mode. Another option is to use the serverless mode of Azure SignalR, which doesn't require a SignalR server, but then you will lose the ability to send messages from client to server (or use a different way called upstream to achieve this). So depending on your use case and architecture, you can choose this option. |
Hi @chenkennt, Thank's for your answer, and I'm sorry for my response delay but I was on hollidays. So I'm gonna try to explain how my negociation server works in deep. I have an SignalRService it's implemented as this :
This service is injected in my server startup on my ConfigureServices :
I have a NegociateController :
With this code, the negociation works well, the AzureSignalR url is returned by the negociation endpoint & the associated access token. Then I told my self the problem is the connection between the NegociationServier and the AzureSignalR.
And I still have the same error. At this point I've tried a last thing, add the hub endpoint in my negociation server configure :
for your information I put the code of my Hub here :
I have already seen this documention you linked. There is somethig I missed in my startup or my service ? Thank's for your time, I'm quite lost about this connection between my negociation server and AzureSignalR. |
Let me explain this a bit more. Azure SignalR Service can work in two different ways:
From what you have described seems the first option is a better choice for you. You can refer to this project which contains a minimum sample about how to establish bidirectional communication between sever and clients. Keep in mind in this mode you don't need to implement the negotiate by yourself and use the |
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 :
"signalROptions" look's like this :
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.
The text was updated successfully, but these errors were encountered: