-
Notifications
You must be signed in to change notification settings - Fork 97
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
500 on negotiate when deployed to load balanced servers #452
Comments
The changes in 10330 is that it throws early when the app server is not connected to the Azure Service. For 10275, even if the app server is not connected to the Azure Service, the client not throw when /negotiate but throw on /connect. Could you make sure that your app server is connected to the Azure SignalR Service? |
I checked the Azure portal and looks like there's no connection to the app server when the site is spun up on the load balanced server. Is there anything in particular that I need to call to make that connection other than app.MapAzureSignalR or do you think its more likely an infrastructure issue since the code seems to work locally? |
Does the load balancer allow web-socket connections? Some proxy need special configuration to enable websocket feature. |
Since the solution was working on 10275 I assume the websocket connections are working just fine on the server but I'll double check tomorrow. |
Just updated to the latest version and I'm still having the same issue. Its working locally but when it gets deployed I get a 500 in my network tab when the request to signalr/negotiate is executed. If I navigate to the url for that request I get the error message "Azure SignalR Service is not connected yet, please try again later.". I also see no connections made to the signalr service on the azure portal when deployed. 10275 still works just fine. This is what my startup.cs looks like.
|
We see exactly same error when we deploy app server to azure cloud service, version 10275 doesn't have this issue. We filed a Microsoft support tick to track this issue. |
Update: after 1.0.0, the config to enable trace is: <system.diagnostics>
<sources>
<source name="Microsoft.Azure.SignalR" switchName="SignalRSwitch">
<listeners>
<add name="ASRS" />
</listeners>
</source>
</sources>
<!-- Sets the trace verbosity level -->
<switches>
<add name="SignalRSwitch" value="Information" />
</switches>
<!-- Specifies the trace writer for output -->
<sharedListeners>
<add name="ASRS" type="System.Diagnostics.TextWriterTraceListener" initializeData="asrs.log.txt" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics> Could you add the following to <system.diagnostics>
<sources>
<source name="Microsoft.AspNetCore.Http.Connections.Client.HttpConnection">
<listeners>
<add name="ASRS" />
</listeners>
</source>
<source name="Microsoft.AspNetCore.Http.Connections.Client.Internal.WebSocketsTransport">
<listeners>
<add name="ASRS" />
</listeners>
</source>
<source name="Microsoft.Azure.SignalR.ServiceConnectionBase">
<listeners>
<add name="ASRS" />
</listeners>
</source>
</sources>
<!-- Sets the trace verbosity level -->
<switches>
<add name="SignalRSwitch" value="Verbose" />
</switches>
<!-- Specifies the trace writer for output -->
<sharedListeners>
<add name="ASRS" type="System.Diagnostics.TextWriterTraceListener" initializeData="asrs.log.txt" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics> |
This is the error in the trace.
|
Thanks @DavidMCarek for your help, this looks like the root cause for no server connection connected and this 500 error. Could you try adding the following assembly rebinding to your <dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly> |
Adding the binding redirect fixes the issue, thanks! Will this issue be fixed in the next release? |
Hi @DavidMCarek, what Azure service are you using to deploy the app server? Is it |
Yep we had it set on classic. |
Hi @DavidMCarek what |
I'm pretty sure we are using .net 4.6.2 |
The latest 1.0.0 should've fixed the issue. |
Currently I am using Microsoft.Azure.SignalR.AspNet.1.0.0-preview1-10330 and when I deploy to load balanced servers I get a 500 in the browser when the /signalr/negotiate endpoint is hit. The really confusing part of this is that it works locally just fine. I tried a setup with 2 iis app pools running the same website and it worked great. I also was able to get this working on the load balanced servers but only once I downgraded the nuget package to 10275. So something has changed that broke deployment to remote load balanced servers.
The text was updated successfully, but these errors were encountered: