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

Sometimes connection fail in "v2.0.0-rc2-12-gf620bcf" version #1757

Closed
jongguheo opened this issue Oct 26, 2018 · 7 comments
Closed

Sometimes connection fail in "v2.0.0-rc2-12-gf620bcf" version #1757

jongguheo opened this issue Oct 26, 2018 · 7 comments

Comments

@jongguheo
Copy link

Hello.

I'm trying to connect AWS aurora from proxysql.

I installed proxysql on AWS EC2. Aurora is same network.

This is my php code. Very simple.

<?php
$mysqli = mysqli_init();

$mysqli->real_connect("127.0.0.1", 'marcelo', 'marcelo', "kit_dev_db01", 6033) or die(mysqli_connect_error());

echo $mysqli->stat();

I created user "marcelo" in proxysql server and aurora server.

Run the php script. Result is like
Pattern 1 (Success)

php z.php
Uptime: 2018 Threads: 1  Questions: 8  Slow queries: 0

pattern 2 (Failure)

php z.php
PHP Warning:  mysqli::real_connect(): (HY000/1045): ProxySQL Error: Access denied for user 'marcelo'@'127.0.0.1' (using password: YES) in /home/dev_kit_user/z.php on line 6
PHP Stack trace:
PHP   1. {main}() /home/dev_kit_user/z.php:0
PHP   2. mysqli->real_connect() /home/dev_kit_user/z.php:6
ProxySQL Error: Access denied for user 'marcelo'@'127.0.0.1' (using password: YES)

How can i resolve it...?

@angrygreenfrogs
Copy link

I'm adding to this issue because "sometimes the connection fails" is the same issue we've noticed with 2.0.

In this same test environment, ProxySQL 1.4.12 works perfectly, no issues at all.

v2.0.0-rc2, however, has occasional authentication failures. It occurs randomly and seems to occur more frequently under load, e.g. initializing 20 connections at once will result in ~6 of them failing with authentication problems.

We're using .NET, so this error message is from the .NET code, but the failures report like this:

Authentication method 'og)w-��N' not supported by any of the available plugins.

That scrambled bit of method text changes each time as well, which makes me suspicious of a memory leak or buffer overrun type problem. Again the exact same simple "open a connection" test works perfectly fine in 1.4.12 or directly to mysql, of course. I may see if I dig out anything further from packet analysis in wireshark.

@renecannao
Copy link
Contributor

Some tcpdump output should absolutely help.
Thanks

@renecannao
Copy link
Contributor

We managed to reproduce this.
Bug confirmed, and a fix will follow early next week

@angrygreenfrogs
Copy link

Thanks, Rene.

I just wanted to add that I finally had some time to re-test, and can confirm I was no longer able to reproduce the problem after a bunch of load testing, all authentications successful.

@muthu-cs
Copy link

@renecannao i have been testing v2.0.0-rc1-17-g832aa48 and having the same issue. 1% of connection fails with the below error under heavy load. is this fix included in the version v2.0.0-rc1-17-g832aa48 ?

MySQL [(none)]> select version();
+------------------------+
| version() |
+------------------------+
| v2.0.0-rc1-17-g832aa48 |
+------------------------+
1 row in set (0.00 sec)

@muthu-cs
Copy link

ProxySQL Error: Access denied for user 'proxysqluser'@'127.0.0.1' (using password: YES)

@angrygreenfrogs
Copy link

@mkshen Rene already responded to this in the other issue. You're using an older version and this was fixed in 75b5865, please re-test using the latest code

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

No branches or pull requests

4 participants