Closed wangenbao1001 closed 7 months ago
Duplicate of #1495
Hi @wangenbao1001, did you get this issue resolved? I am also suffering with same issue even using SqlClient 5.1.4 with Auzre.Identity 1.10.4.
@zheweiwangMicrosoft Have you tried 5.2 preview 5?
@zheweiwangMicrosoft Have you tried 5.2 preview 5?
@ErikEJ Not yet, but we can try. any idea when MDS 5.2 will be officially released?
Also do you know if such issue is related with https://github.com/dotnet/SqlClient/issues/1946 or is it useful if we increase connection timeout from 30 to 60 seconds in connection string?
You should always have a 60 second connection timeout when using Azure SQL. 5.2 is planned for end of this month.
I also upgrade to 5.2.0-preview5.24024.3, and it is also still happening.
Yes. It is still happening with MDS 5.2.0-preview5.24024.3 and Azure.Identity 1.10.4.
Sorry for deleted my previous comment by mistake.
Any updates on this?
Still seeing "System.OperationCanceledException" even after upgrading to MDS 5.2.1, as the fix does not seem to be released to 5.2.1 yet - is there an ETA for the release?
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.GetAccessTokenAsync(CancellationToken cancellationToken, ILoggerAdapter logger)
at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<<RunAsync>b__1>d.MoveNext() --- End of stack trace from previous location ---
at Microsoft.Identity.Client.Utils.StopwatchService.MeasureCodeBlockAsync(Func`1 codeBlock)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.ApiConfig.Executors.ConfidentialClientExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenForClientParameters clientParameters, CancellationToken cancellationToken)
at Azure.Identity.<REDACTED>ns.ExecuteAsync[T](AbstractAcquireTokenParameterBuilder`1 builder, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.MsalConfidentialClient.AcquireTokenForClientCoreAsync(String[] scopes, String tenantId, String claims, Boolean enableCae, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.MsalConfidentialClient.AcquireTokenForClientAsync(String[] scopes, String tenantId, String claims, Boolean enableCae, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.ManagedIdentityClient.AuthenticateAsync(Boolean async, TokenRequestContext context, CancellationToken cancellationToken)
at Azure.Identity.ManagedIdentityCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage, Boolean isCredentialUnavailable)
at Azure.Identity.ManagedIdentityCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.ManagedIdentityCredential.GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
at Microsoft.Data.SqlClient.ActiveDirectoryAuthenticationProvider.AcquireTokenAsync(SqlAuthenticationParameters parameters)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.<>c__DisplayClass148_1.<<GetFedAuthToken>b__1>d.MoveNext() --- End of stack trace from previous location ---
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.GetFedAuthToken(SqlFedAuthInfo fedAuthInfo)
We continue to see intermittent connection issues with release v5.2.1, where the fix hasn't been included yet https://github.com/dotnet/SqlClient/commit/080e66950d9d0b6d113c8eae3a2056372159f258
Any plans when ^ fix will be released? Much appreciated
We use MangedIdentity to access Azure SQL Server. In an instant, there will be connections to a large number of different dbs. We received a lot of issues like
SDK version:
Another info: When I use
Microsoft.Data.SqlClient: 5.0.0
, I received issues like below, then I upgrade to5.1.5