Skip to content
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

Better way to detect if SslProtocols.None is valid #475

Closed
pantonis opened this issue Apr 5, 2018 · 8 comments
Closed

Better way to detect if SslProtocols.None is valid #475

pantonis opened this issue Apr 5, 2018 · 8 comments

Comments

@pantonis
Copy link

@pantonis pantonis commented Apr 5, 2018

After upgrading from version 0.32 to 0.38 I get the following error:

FATAL 2018-04-05 20:10:57,072 [1] roServices.Test.Console.Program - FirstChance Exception  -- Authentication failed because the remote party has closed the transport stream.
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
FATAL 2018-04-05 20:10:57,192 [1] roServices.Test.Console.Program - FirstChance Exception  -- Authentication failed because the remote party has closed the transport stream.
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
FATAL 2018-04-05 20:10:57,237 [1] roServices.Test.Console.Program - FirstChance Exception  -- Authentication failed because the remote party has closed the transport stream.
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)

I am using MySql 5.7

@bgrainger
Copy link
Member

@bgrainger bgrainger commented Apr 5, 2018

I don't see any MySqlConnector code in those call stacks, so it's not clear to me where the problem is originating.

Since you appear to be using a console program, please add the following line of code to the beginning of your Main method (or other initialisation code), which should provide much more detailed logging (then upload that).

MySqlConnectorLogManager.Provider = new ConsoleLoggerProvider(MySqlConnectorLogLevel.Debug);

@bgrainger bgrainger added the waiting for answer Needs more information from the bug reporter label Apr 5, 2018
@pantonis
Copy link
Author

@pantonis pantonis commented Apr 6, 2018

@bgrainger thanks for your reply

[DEBUG] ServerSession   Session0.1 created new session
[INFO]  MySqlConnection Created new non-pooled Session0.1
FATAL 2018-04-06 08:47:58,013 [1] Test.Console.Program - FirstChance Exception  -- Authentication failed because the remote party has closed the transport stream.
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
FATAL 2018-04-06 08:47:58,108 [1] Test.Console.Program - FirstChance Exception  -- Authentication failed because the remote party has closed the transport stream.
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
FATAL 2018-04-06 08:47:58,141 [1] Test.Console.Program - FirstChance Exception  -- Authentication failed because the remote party has closed the transport stream.
System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
[INFO]  ServerSession   Session0.1 connecting to IpAddress 127.0.0.1 for HostName '127.0.0.1'
[DEBUG] ServerSession   Session0.1 connected to IpAddress 127.0.0.1 for HostName '127.0.0.1' with local Port 5140
[DEBUG] ServerSession   Session0.1 server sent AuthPluginName=mysql_native_password
[INFO]  ServerSession   Session0.1 made connection; ServerVersion=5.7.21-log; ConnectionId=37; Compression=False; Attributes=True; DeprecateEof=True; Ssl=False
[DEBUG] ServerSession   Session0.1 creating connection attributes
[INFO]  ServerSession   Session0.1 sending QUIT command
[INFO]  ServerSession   Session0.1 closing stream/socket
[DEBUG] ServerSession   Session0.2 created new session
[INFO]  MySqlConnection Created new non-pooled Session0.2
[INFO]  ServerSession   Session0.2 connecting to IpAddress 127.0.0.1 for HostName '127.0.0.1'
[DEBUG] ServerSession   Session0.2 connected to IpAddress 127.0.0.1 for HostName '127.0.0.1' with local Port 5141
[DEBUG] ServerSession   Session0.2 server sent AuthPluginName=mysql_native_password
[INFO]  ServerSession   Session0.2 made connection; ServerVersion=5.7.21-log; ConnectionId=38; Compression=False; Attributes=True; DeprecateEof=True; Ssl=False
[DEBUG] TextCommandExecutor     Session0.2 ExecuteBehavior Synchronous CommandText: USE `Test.Console`
[DEBUG] ServerSession   Session0.2 entering FinishQuerying; SessionState=Querying
[INFO]  ServerSession   Session0.2 sending QUIT command
[INFO]  ServerSession   Session0.2 closing stream/socket
[INFO]  ConnectionPool  Pool1 creating new connection pool for ConnectionString: Server=127.0.0.1;Port=3306;Database=Test.Console;User Id=testuser;AllowUserVariables=True;Use Affected Rows=False
[DEBUG] ConnectionPool  Pool1 reaping connection pool
[DEBUG] ConnectionPool  Pool1 recovered no sessions
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ServerSession   Session1.1 created new session
[INFO]  ConnectionPool  Pool1 no pooled session available; created new Session1.1
[INFO]  ServerSession   Session1.1 connecting to IpAddress 127.0.0.1 for HostName '127.0.0.1'
[DEBUG] ServerSession   Session1.1 connected to IpAddress 127.0.0.1 for HostName '127.0.0.1' with local Port 5142
[DEBUG] ServerSession   Session1.1 server sent AuthPluginName=mysql_native_password
[INFO]  ServerSession   Session1.1 made connection; ServerVersion=5.7.21-log; ConnectionId=39; Compression=False; Attributes=True; DeprecateEof=True; Ssl=False
[DEBUG] ConnectionPool  Pool1 returning new Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='Test.Console' AND TABLE_NAME='__EFMigrationsHistory';
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ServerSession   Session0.3 created new session
[INFO]  MySqlConnection Created new non-pooled Session0.3
[INFO]  ServerSession   Session0.3 connecting to IpAddress 127.0.0.1 for HostName '127.0.0.1'
[DEBUG] ServerSession   Session0.3 connected to IpAddress 127.0.0.1 for HostName '127.0.0.1' with local Port 5143
[DEBUG] ServerSession   Session0.3 server sent AuthPluginName=mysql_native_password
[INFO]  ServerSession   Session0.3 made connection; ServerVersion=5.7.21-log; ConnectionId=40; Compression=False; Attributes=True; DeprecateEof=True; Ssl=False
[DEBUG] TextCommandExecutor     Session0.3 ExecuteBehavior Synchronous CommandText: USE `Test.Console`
[DEBUG] ServerSession   Session0.3 entering FinishQuerying; SessionState=Querying
[INFO]  ServerSession   Session0.3 sending QUIT command
[INFO]  ServerSession   Session0.3 closing stream/socket
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='Test.Console' AND TABLE_NAME='__EFMigrationsHistory';
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT `MigrationId`, `ProductVersion`
FROM `__EFMigrationsHistory`
ORDER BY `MigrationId`;
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ServerSession   Session0.4 created new session
[INFO]  MySqlConnection Created new non-pooled Session0.4
[INFO]  ServerSession   Session0.4 connecting to IpAddress 127.0.0.1 for HostName '127.0.0.1'
[DEBUG] ServerSession   Session0.4 connected to IpAddress 127.0.0.1 for HostName '127.0.0.1' with local Port 5144
[DEBUG] ServerSession   Session0.4 server sent AuthPluginName=mysql_native_password
[INFO]  ServerSession   Session0.4 made connection; ServerVersion=5.7.21-log; ConnectionId=41; Compression=False; Attributes=True; DeprecateEof=True; Ssl=False
[DEBUG] TextCommandExecutor     Session0.4 ExecuteBehavior Synchronous CommandText: USE `Test.Console`
[DEBUG] ServerSession   Session0.4 entering FinishQuerying; SessionState=Querying
[INFO]  ServerSession   Session0.4 sending QUIT command
[INFO]  ServerSession   Session0.4 closing stream/socket
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='Test.Console' AND TABLE_NAME='__EFMigrationsHistory';
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT `MigrationId`, `ProductVersion`
FROM `__EFMigrationsHistory`
ORDER BY `MigrationId`;
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `OrderStatus` AS `o`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `OrderSide` AS `o`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `ExecutionType` AS `e`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `OpenType` AS `o`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `CloseType` AS `c`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `CloseType` AS `c`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `CloseType` AS `c`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `CloseType` AS `c`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `CloseType` AS `c`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `OrderState` AS `o`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: SELECT CASE
    WHEN EXISTS (
        SELECT 1
        FROM `ModificationType` AS `m`)
    THEN TRUE ELSE FALSE
END
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: TRUNCATE TABLE SomeTable
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back1`
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: TRUNCATE TABLE SomeOtherTable
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back
[DEBUG] ConnectionPool  Pool1 waiting for an available session
[DEBUG] ConnectionPool  Pool1 found an existing session; checking it for validity
[DEBUG] ServerSession   Session1.1 ServerVersion=5.7.21-log supports reset connection; sending reset connection request
[DEBUG] ConnectionPool  Pool1 returning pooled Session1.1 to caller; LeasedSessionsCount=1
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: set transaction isolation level repeatable read; start transaction;
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: INSERT INTO SOME QUERY
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] TextCommandExecutor     Session1.1 ExecuteBehavior Synchronous CommandText: commit
[DEBUG] ServerSession   Session1.1 entering FinishQuerying; SessionState=Querying
[DEBUG] ServerSession   Session1.1 returning to Pool1
[DEBUG] ConnectionPool  Pool1 receiving Session1.1 back

@bgrainger
Copy link
Member

@bgrainger bgrainger commented Apr 6, 2018

I'm still not sure what the problem is. It looks like the program continues to run correctly.

Are you concerned that some component is logging first-chance exceptions? As per https://blogs.msdn.microsoft.com/davidklinems/2005/07/12/what-is-a-first-chance-exception/:

Does a first chance exception mean there is a problem in my code?
First chance exception messages most often do not mean there is a problem in the code.

@bgrainger
Copy link
Member

@bgrainger bgrainger commented Apr 6, 2018

If I had to guess, I'd say the exception is related to GetDefaultSslProtocols added in e4c8aec.

The mitigation here might be to add a net47 package that could bypass that method, since it could assume that SslProtocols.None is a valid option (unless .NET 4.7 programs can opt out of that setting, which may be possible).

@pantonis
Copy link
Author

@pantonis pantonis commented Apr 6, 2018

I didn't say that the program does not run correctly. I wrote that I get an error.
I see what is the issue here. Although I run a .NET 4.7.1 app I still get this error
When I debug the code inside GetDefaultSslProtocols

the following exception is catched

catch (Exception)
{
	s_defaultSslProtocols = SslProtocols.None;
}

I have to mention though that I don't use this library directly but as part of the Pomelo.EntityFrameworkCore.MySql

@bgrainger bgrainger changed the title Authentication failed because the remote party has closed the transport stream Better way to detect if SslProtocols.None is valid Apr 6, 2018
@bgrainger bgrainger added enhancement and removed waiting for answer Needs more information from the bug reporter labels Apr 6, 2018
@bgrainger
Copy link
Member

@bgrainger bgrainger commented Apr 7, 2018

I didn't say that the program does not run correctly. I wrote that I get an error.

Is there a reason it's being logged as FATAL? I read that and assumed it meant program termination.

@pantonis
Copy link
Author

@pantonis pantonis commented Apr 7, 2018

You just found a bug in my code. hahaha

@bgrainger
Copy link
Member

@bgrainger bgrainger commented Apr 18, 2018

Fixed in 0.40.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants