AzureSignalR-samples
AzureSignalR-samples copied to clipboard
Can' get the sample to work. 'Failed to start connection'
When i follow the steps of "Build Your First Azure SignalR Service Application" tutorial, i get the following exception on running the web app:
Microsoft.AspNetCore.Http.Connections.Client.HttpConnection[11]
Failed to start connection. Error starting transport 'WebSockets'.
System.Net.WebSockets.WebSocketException (0x80004005): Unable to connect to the remote server ---> System.Net.Http.HttpRequestException: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer
bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat ---> System.Net.Sockets.SocketException: Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.WebSockets.WebSocketHandle.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options)
at System.Net.WebSockets.WebSocketHandle.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options)
at System.Net.WebSockets.ClientWebSocket.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Http.Connections.Client.Internal.WebSocketsTransport.StartAsync(Uri url, TransferFormat transferFormat)
at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartTransport(Uri connectUrl, HttpTransportType transportType, TransferFormat transferFormat)
(sorry for the german exception message in there, i don't know how to set them english)
Anyone else facing this problem?
Can you share your application?
Yes here is the link to my repo: https://github.com/flowest/AzureSignalRTest
Is there a resolution to this? I started getting this recently...
@flowest I tried your project and it works well. Anything else to share?
@xscript Thanks for your work.
Basically thats all for me to share, becaus the sample just consits of the web app and the SignalR Service. The only thing i can imagine is the SignalR Service configuration.
Since this is a new Azure Service in preview, can you tell me where you set the location of the SignalR Service resource? I noticed it makes a difference where you locate your service in some cases if they are in preview (e.g. the Azure IoT Hub Events).
Otherwise i have no idea what i am doing wrong 😄
For SignalR Service, all regions are the same. If you want to try, I am using Southeast Asia.
Could you share your service instance name so that I can checkout backend logs to see what happened?
You can email it to kevinzha at microsoft.com
@xscript
My instance name is “backplane”
So I am using the Azure Signalr Service - I am running into a case where occasionally it works wonderful and other times the clients just get closed down before they even get into chat mode. The examples is as per the github examples with the obvious azure created signalr Service. Is there an underlying network issue causing the intermittent service on this. ?
@bsampica I didn't see anything unusual for your instance. Let me investigate more .
@ClientIco How often do you see this happen? If not, how long does it last? Also how many servers do you have? Where do you host them?
@xscript mine ist signalrfwl
@xscript my issue ended up being related to using generic arguments in my hub class which busts things pretty good
@bsampica Good to know you found the root cause.
@flowest Didn't see any external request. I guess there is something blocking outgoing traffic in your network. Could you check your firewall rules?
I think am really starting to doubt if normal routing / not from our side / but between continents are causing major head aches. It will work in South Africa, then it will stop working in Australia, then occasionally it will work in Asia/Russia.... I would expect the path 2 azure would take specific and different routes which is prioritized when doing websockets - so far countries closest 2 USA have better success rate ? Anyone else experiencing the same issue ? Take note my azure signalr instance current resides in USA central
On Tue, 29 May 2018, 16:01 Kevin Zhao, [email protected] wrote:
@bsampica https://github.com/bsampica Good to know you found the root cause.
@flowest https://github.com/flowest Didn't see any external request. I guess there is something blocking outgoing traffic in your network. Could you check your firewall rules?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspnet/AzureSignalR-samples/issues/22#issuecomment-392787710, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmA2lxu7qRxJeQ41QnuC1lGSC4UY0Jmks5t3VS4gaJpZM4UEbaO .
I am having the similar error for ChatRoom sample. Here I opened a topic about details.
It looks pretty straightforward in the sample but I couldn't make neither console app or html part connect to SignalR Service on Azure. I encounter "No host is known" error.
I made it running by creating a new SignalR service with a different name. Previous one was "mcbu" if it matters for investigation.
@mustafababil Thanks for the detailed information!
Looks like domain name binding failed when provisioning your first instance. Which region is the mcbu instance in?
@xscript If I am not wrong, it was in US East. The new one is in US West.
@mustafababil Yeah, we met some issue in US East region in the past couple of days. The domain name binding failed due to some reason. We have fixed it. So it shouldn't be a problem now.
@flowest Do you still not be able to run the sample?
@ClientIco Have you figured out the root cause? We would like to help out if you want.
@xscript I just tried everything again from scratch, still no luck... Maybe the firewall is responsible for that
@flowest Have you tried using different network?