-
Notifications
You must be signed in to change notification settings - Fork 337
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
ConnectionFailedException: The collection already contains item with same key 'net.transport' #1074
Comments
Does your connection string contain multiple host names? |
There's a retry loop for SSL; it seems possible that this error could occur if the first TLS handshake (for TLS 1.2) fails and the client tries again. |
I was able to reproduce this by connecting to a server that only supports TLS 1.1; the exception is thrown when internally retrying the connection. You should be able to work around it by adding Thanks for reporting the problem! |
I see what you mean. Thanks for the hint. My problem is solved. I am adding some testing results, just, for the record. Tls Version 1.1 doesn't work with this mysql database server we are using. 1.0 works for this one. So, I appended following with the connection string,
I tried few things with the database server (MySqlConnector version 2.0.0-rc.1). I found following,
When I try TLS Version 1.1 I get following,
|
So do earlier versions of MySqlConnector; it's just that before #1037 the internal retry loop (to downgrade TLS versions) didn't cause the exception you were seeing (but it was still happening). |
(useful when MySqlConnector uses wrong one ref, mysql-net/MySqlConnector#1074 )
Software versions
MySqlConnector version:
bug exists in nuget package versions starting with '2.0.0-beta.5'.
Specifically, 2.0.0-beta.5' and '2.0.0-rc.1' repro this.
Server type (MySQL, MariaDB, Aurora, etc.) and version:
MySQL
.NET version: .Net 6
ORM NuGet packages and versions: 2.0.0-beta.5 and 2.0.0-rc.1
Describe the bug
starting with version 2.0.0-beta.5 connection is failing with MySQL server. It was working till 1.4.0-beta.4. It still works if I downgrade to 1.4.0-beta.4.
Exception
Code sample
https://github.com/abock/goodbye-wordpress/blob/master/Goodbye.WordPress/MysqlPostReader.cs#L51
Expected behavior
runs without exception and no error with old versions. I am expecting same behavior with new versions of MySqlConnector
The text was updated successfully, but these errors were encountered: