近期大数据相关业务的MySQL上proxysql时遇到一个问题,开源BI平台metabase,通过proxysql访问mysql后无法建立连接。直接抛如下异常:
java.lang.Exception: java.sql.SQLNonTransientConnectionException: unexpected end of stream, read 0 bytes
from 7 (socket was closed by server)
at metabase.driver.util$can_connect_with_details_QMARK_.invokeStatic(util.clj:34)
at metabase.driver.util$can_connect_with_details_QMARK_.doInvoke(util.clj:18)
proxysql的版本:
ProxySQL version 1.4.11-6-g4e44db1, codename Truls
proxysql日志中有报如下异常:
2019-07-18 10:14:16 MySQL_Session.cpp:95:kill_query_thread(): [WARNING] KILL CONNECTION 0 on 10.26.1.168:3306
2019-07-18 10:14:24 MySQL_Session.cpp:2448:handler(): [ERROR] Unexpected packet from client, disconnecting the client
2019-07-18 10:14:24 MySQL_Session.cpp:2448:handler(): [ERROR] Unexpected packet from client, disconnecting the client
异常后切换到直连mysql是正常的。
在git中有类似的问题:[#1138](https://github.com/sysown/proxysql/issues/1138)。大概的问题是:
1、使用了maridb的驱动,mariadb-connector-j 2.0.0 增加了一个参数usePipelineAuth,默认是开启的。就是在发送一个请求时,没有收到回复时,就可以发送下一个请求,这时proxysql来说就是一个异常请求会断掉连接,并报如下错“[ERROR] Unexpected packet from client”。
2、切换到mysql驱动后能正常使用,mysql-connector 是没有这方面的功能的
3、使用maridb驱动需要将usePipelineAuth设置为false
知道大概方向后,向开发确认信息,确实使用maridb的驱动,不过将usePipelineAuth参数设置为false还是不行,后面将驱动换成mysql就正常了。
文章最后更新时间:
2019年07月20日 14:28:59
no deposit casino online slot machines real money real online casino online casinos for real money online slot machines real money
card games online best casinos online casino games real money best online gambling sites casino slots
online casinos best online casino for real money online casino usa real money online gambling sites online slots for real money
play slots for real money united states no deposit bonus real money slot machines online casino real money gambling sites
online gambling sites best online casino for real money slot games slot games online online casinos for real money
online gambling sites slots real money slot games online best online casino real money play slots for real money united states
best gambling sites bonus casino online casino games real money online gambling real money no deposit bonus codes
real money slot machines best online gambling sites best online casino for real money best online casino real money real online casino
real money casino games casino card games slots real money casino slot games slot games
best online casino casino slots casinos online play slots online casino real money us