-
Notifications
You must be signed in to change notification settings - Fork 341
SSL Authentication Error connecting to Amazon Aurora #576
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
Comments
Are you running on Windows 10 client or Windows Server?
Are these Windows Containers? Would it be possible to get a packet capture of one of the failed connections? |
This error has been previously reported with Aurora: #428 Also reported on Stack Overflow (also with Aurora); in this case the poster was using Connector/NET, but the The common factor here seems to be Amazon Aurora. The SO poster adds:
The evidence suggests a problem with Amazon Aurora, but I'm not sure how to “prove” that (or how to file a bug report for Amazon). |
The OS is Windows Server 2016, and these are Windows Containers. I'll see if I can get packet captures. |
@comagnan , were you able to resolve this issue? Something similar also happens to our platform at random:
|
@jefraim Are you also using Amazon Aurora? |
We're using Amazon RDS MySQL, |
@jefraim I just noticed that (from your call stack) you appear to be using Oracle's Connector/NET. This repo is for MySqlConnector, an OSS replacement for that library. To report a problem with that library, go to https://bugs.mysql.com/. You could try switching to MySqlConnector https://www.nuget.org/packages/MySqlConnector/ if you like, but it's unlikely to help with this particular problem. It does fix a lot of other bugs, however: https://mysql-net.github.io/MySqlConnector/tutorials/migrating-from-connector-net/#fixed-bugs |
We are also experiencing this with Amazon Aurora and Oracle Connector/Net I will go to the relevent bug location to report this |
I am having the same problem. Here is my LINQ statement
I randomly get the following error
Here is the stack trace
|
@CrestApps You are using Connector/NET, created by Oracle. Their bug reporting site is https://bugs.mysql.com/. Are you also using Amazon Aurora as the MySQL server? That appears to be the common factor in these bug reports. |
While I am unfortunately not in a position to give packet captures after all, I wanted to give some more information I found while comparing Connector/NET and MySqlConnector.
These errors are temporary, so I ended up simply adding a retry on MySqlExceptions caused by AuthenticationException. |
Does anyone have a link to the aurora/oracle ticket related to this? |
We are seeing the same issue connecting on first start of a new service process to an Amazon Aurora MySQL DB. Anyone have the link to the Oracle bug? |
it happens also on mysql running on windows server (not related to amazon) |
In windows i have the same error, but resetting iis server . that's resolve my problem |
I am experiencing this issue with AWS Aurora. Since this issue is 3 years old, I imagine a fix is not coming. Has anyone found a work around when running against AWS Aurora? |
It's a good idea to assume that the network is unreliable and that |
@bgrainger Thanks, I appreciate your quick feedback. |
All indications are that this is a problem on Aurora's end. There's not much MySqlConnector can do to work around it. Recommendation is that clients retry opening a connection several times (e.g., with Polly) to recover from intermittent connection errors like this. |
This happens randomly on the first call that opens a connection to the database with connection.Open(). The inner exception states "The message received was unexpected or badly formatted".
Here is the full stack trace.
Over the hundreds of connections opened automatically during testing of MySqlConnector over the weekend, connections have failed to open roughly 90 times. In the majority of cases the library works as expected. When it fails, it's always on the first attempt at opening a connection since starting the process (then the process exits).
========
Some information about the setup:
MySqlConnector version: 0.46.0
Windows version: 10.0.14393.2430
.net version: 4.6.1
mySQL version: 5.6.10 (Aurora)
Code is running inside of Docker containers (Enterprise Edition 18.03.1-ee-3)
The text was updated successfully, but these errors were encountered: