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
Getting Azure SignalR Service is not connected yet, please try again later. in local environment #909
Comments
Could you try https://github.com/Azure/azure-signalr/blob/c764ee716b0b6079d4085c1c68d02c29be3c8aea/docs/tsg.md#troubleshooting-guide-1 to see what is the exception thrown? Probably the 500 error is caused by some assembly binding issue, have you updated any reference package versions in your local environment? |
@vicancy I've got this --> Azure SignalR Service is not connected yet, please try again later. Other than that whole lot of The remote server returned an error: (400) Bad Request. I haven't updated any packages recently. Which puzzles me is that, the same code works fine in Production environment but not in local. Maybe the Production servers too will give the same error if we reset IIS. |
Ok. This seems to have started working again. I suspect something went wrong at Azure's end and they have corrected it now. |
Yes we've identified an issue when user is using ASP.NET SignalR protocol SymptomThe server connection might unable to connect to Azure SignalR with 400 status code. Root causeThe latest version of Azure SignalR added a stricter validation rule for ASP.NET SignalR application name and hub names that app servers with hub names containing characters like SolutionWe have rolled back the validation check and have fixed the impacted resources and the issue should be gone now. |
Thank you @vicancy . |
I ran into this problem public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((context, config) => config.ConfigureKeyVault())
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
}) But it works do this instead: public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((context, config) => config.ConfigureKeyVault())
.UseStartup<Startup>(); For both senerios in startup.cs: public void ConfigureServices(IServiceCollection services)
{
services
.AddSignalR()
.AddAzureSignalR();
} I am using
|
@davidkallesen Besides
|
In your Startup.cs do you have a line similar to this: services.AddHostedService(); ? Also inside of that worker are you trying to send out a signalR message ? If you are then that's what might be causing your issues. At least for me that's what it was. The hosted service (Worker) would start up and run before the AzureSignalR connection is established so it would blow up the whole project with the exact same error you're seeing. All I did for right now is added a Task.Delay(10000) to let the project start up. I'll be interested to find out if there is a way to tell if the AzureSignalR connection has been established before sending anything through the HubContext. |
Microsoft.Azure.SignalR.Common.AzureSignalRNotConnectedException: Azure SignalR Service is not connected yet, please try again later. |
Make sure u register: before the instantiation of your class that uses the IHubContext someHub, in it constructor I instantiate it like this |
I had the same issue |
Hello!
I've been getting above error since yesterday when I'm debugging my MVC webapp locally via VS 2019. The error comes from the negotiate request which is something like below:
http://localhost:53652/signalr/negotiate?clientProtocol=2.1&connectionData=
I've deployed it to one of our Dev servers in Azure cloud, and now that too getting the same error and SignalR is not workable. However, SignalR is still working fine in our Production servers.
I've followed this: #452
And this: https://forums.asp.net/t/2154631.aspx?Error+500+using+Azure+SignalR+service
But still no use.
After enabling diagnostics as per the first link, I was getting an error saying that I cannot connect to our Azure SignalR instance. But I don't get it since, the production servers can connect and working fine.
I was in Azure SignalR v1.2.3, and later updated to v1.4.3 thinking that would resolve. But still no luck.
My Startup class:
Any help will be highly appreciated.
Thank you.
The text was updated successfully, but these errors were encountered: