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

Java connection using MariaDB 2.4.1 JDBC driver fails to load server variables #2009

Closed
marcel-dias opened this issue Apr 11, 2019 · 1 comment

Comments

@marcel-dias
Copy link

marcel-dias commented Apr 11, 2019

Hey,

I'm trying to connect to Admin interface using Java MariaDB JDBC driver.

it fails to load the server variables as the variables had changed from the fix in #743

ProxySQL version: 2.0.3 in docker proxysql/proxysql:2.0.3
MariaDB JDBC version: 2.4.1

The exception is

java.sql.SQLNonTransientConnectionException: could not load system variables
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:240)
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:171)
	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1128)
	at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:560)
	at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:174)
	at org.mariadb.jdbc.Driver.connect(Driver.java:92)
Caused by: java.sql.SQLNonTransientConnectionException: could not load system variables
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:240)
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.connException(ExceptionMapper.java:101)
	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.requestSessionDataWithShow(AbstractConnectProtocol.java:628)
	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.additionalData(AbstractConnectProtocol.java:641)
	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connect(AbstractConnectProtocol.java:450)
	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1124)
	... 5 more
Caused by: java.sql.SQLNonTransientConnectionException: could not load system variables. socket connected: true
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:240)
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.connException(ExceptionMapper.java:101)
	at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.connException(ExceptionMapper.java:97)
	at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.requestSessionDataWithShow(AbstractConnectProtocol.java:622)
	... 8 more

Debugging the driver I found the sql it executes to retrieve the server variables:

SHOW VARIABLES WHERE Variable_name in ('max_allowed_packet','system_time_zone','time_zone','auto_increment_increment');

And this the ProxySQL Admin interface return nothing to this query

> SHOW VARIABLES WHERE Variable_name in ('max_allowed_packet','system_time_zone','time_zone','auto_increment_increment');
Empty set (0.01 sec)

Could you implement a return for this query ?

Thank you!

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

2 participants