-
Notifications
You must be signed in to change notification settings - Fork 299
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
System.InvalidOperationException: 'Internal connection fatal error.' #1116
Comments
You could try running something like WireShark to capture the difference between the two cases at the TCP level, because there's probably not enough information in the stacktrace to help. |
Hi @figueiredorui, what version of Microsoft.Data.SqlClient are you using? Is this a .NET Core or .NET Framework application? You can try enabling event tracing and posting the event log here. |
Hi @johnnypham Event Log |
Similar issue here using 3.0 with .NET 5, version 2.1.3 works fine. |
Could you also try out the 3 preview versions of v3.0.0 to get the first version to contain this issue? |
@cheenamalhotra preview 1 seems to be working. 2, 3 and stable are not working. |
@figueiredorui @r-work can you provide as much details as you can about your client/server environment (version, platform, etc) so we can get a local repro to investigate this? |
I'm setting up a new development environment and installing the various tools/frameworks to find out which one makes my project fail running. So far so good ... |
I'm experiencing very similar with .NET Core 3.1 and Microsoft.Data.SqlClient 3.0.0:
I assume its relevant that this issue started for me when I was forced to apply the latest Windows Update (KB5003637). I'm working on Win 10 Pro with VS2019 (16.9.4). ...any thoughts on ways to investigate and resolve this? |
I wasn't able to reproduce it with this same configuration. Can you confirm if the issue is present starting with 3.0.0-preview2? |
Hi @johnnypham, Thank you for your reply. I've just enabled prerelease in NuGet, and installed 3.0.0-preview2.21106.5 which is exhibiting the same behaviour. Is there any other information I can share so that your system can reproduce the same error? One of my colleagues updated his system to the same Window Update Version and is now also getting the same error while previously everything worked fine, so we have managed to reproduced this at least twice... All the best, Fraser |
Can you try 3.0.0-preview1? |
Unfortunately exactly the same error message... |
Hi @fraserbooth Your issue seems different that what is being discussed here from earlier customer. In your case it seems to be related to some sort of configuration issue or an environment related problem. Could you open a new ticket with all related information:
|
Checking in, did you manage to create a repro to this issue? |
Closing due to inactivity and lack of repro. |
Hi @cheenamalhotra it seems we hit the same error here: System.InvalidOperationException: Internal connection fatal error.
GET /api/v1/country User: '' Internal connection fatal error.
System.InvalidOperationException: Internal connection fatal error.
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.DrainData(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.ThrowUnsupportedCollationEncountered(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.GetCodePage(SqlCollation collation, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.TryProcessEnvChange(Int32 tokenLength, TdsParserStateObject stateObj, SqlEnvChange& sqlEnvChange)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location ---
at Dapper.SqlMapper.QueryAsync[T](IDbConnection cnn, Type effectiveType, CommandDefinition command) in /_/Dapper/SqlMapper.Async.cs:line 417 Repro conditions:
Scenario A: Scenario B: $ uname -a
Linux 953c836e7379 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 Linux
to discard TLS issues.
Connection string in both scenarios: Expected behavour
Actual behavour
|
Update: fixed on my side doing the following actions:
RUN apk add icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false |
@pjmolina Thank you for the update. |
.
Exactly: replacing the library and then updating the references across the project. |
Thank you! It works like a charm :) |
I had the same issue with System SqlClient. After upgrading to Microsoft.Data.SqlClient it turned out the problem was with invariant globalization. Turning it off helped me with both System and Microsoft SqlClient.
The moral is, you may get more useful error messages from Microsoft SqlClient than from the System one. |
I'm looking for some help troubleshooting an issue that I'm having in one of my Development machines.
The following code is throwing a System.InvalidOperationException: 'Internal connection fatal error.' when opening the connection.
Here is the stach trace
On the same machine, using the legacy library 'System.Data.SqlClient', the following code works fine
I have tried a few things like:
Repair .NET 5
Repair SQL Server 2019 Developer
Repair VS2019
Does anyone have suggestions that could help to understand the source of the issue?
Thanks
The text was updated successfully, but these errors were encountered: