-
Notifications
You must be signed in to change notification settings - Fork 300
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
v5.2.0 Connection open issue #2422
Comments
It's possible that this is related to an unintentional change reported here #2415 Could you try flipping the appcontext switch mentioned in that issue and see if it helps? |
I have set the following at application startup: AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.UseOneSecFloorInTimeoutCalculationDuringLogin", true); but I still get the same error as before. EDIT: My initial assumption seems to be wrong: it does not matter if AzureSQL uses proxy or redirect mode (at least not from a Windows). Are there inherent dependencies on Linux that could be now required? |
Does the new release use a port or protocol during connection that the previous did not use? What is the best way to 'debug' this, should I create an event listener and subscribe to traces emitted? |
After further testing:
The issue is with the 1st case. By Linux, I tested from WSL (Ubuntu 22.04) and from Linux containers (asp.net core 8.0 jammy chiseled image), and both throw the above error. |
Can you try adding a port number at the end of connection string? like: tcp:, port number? |
It is in the connection string (it has been there for all my tests): EDIT: I tried w/o the port number in the connectionstring and both returns the same error. I also have this in the logs, not sure if it helps: and from WSL the stacktrace looks slightly different, but the error is the same:
EDIT: any chance this is related? 94c089e#diff-a9b4126995728b5ff4d99d7c10d8e6af5259ee81a790274529b028e7213b2707 |
Is this Kerberos authentication? Is it possible that you can test with below nuget? (Keep in mind that this nuget is just for testing purposes and it is not an official release and not suitable for production) Just change the extension to .nupkg and it should be good to go (version would be 6.0.0-pull.106802.1) |
It is using username and password authentication (removed that section from the connectionstring in the above samples). Let me test the package (I might only come back with results on Monday because I am catching a flight very soon). |
In my initial test from my dev vm, it seems to have fixed the issue. The version number for me was shown as 6.0.0-pull.106802. |
It will help to confirm that the regression is addressed in this build. Thank you. |
I have tested from the docker container as well, and I can confirm the fix works as expected. Thank you very much for the quick turnaround. May I ask what was the issue? (just for my curiosity). My last question: do you already have any plans for the next release? When would you expect the fix to go live? - Asking only, so that I can plan along. |
@deaklasECB Issue #2378 was the initial report highlighting a regression introduced in v5.2.0. This issue will be resolved in the upcoming hotfix release, v5.2.1, with the release date yet to be determined. |
Closing as duplicate of #2378. |
Describe the bug
When upgrading from 5.1.5 to 5.2.0 and connecting to Azure Sql, I get an error when connecting to the database.
Expected behavior
Connection should be established.
I suspect this might be related to the redirect/proxy connection policy in Azure SQL, because I have 2 instances, one with such a policy and one without, and in one case version 5.2.0 works but in the other it does not.
Is there anything to be changed in the connection string or an env. var to enable the connection?
Further technical details
Microsoft.Data.SqlClient version: 5.2.0
.NET target: (.NET 8)
SQL Server version: Azure SQL
Operating system: Linux containers
The text was updated successfully, but these errors were encountered: