dble-3.22.07版本连接mariadb-10.3.14 navcat和mysql默认客户连接异常
biaotongkeji opened this issue · 1 comments
-
dble version:3.22.07
-
** mariadb version:10.3.14 **
-
steps:
step1. 环境:通过dble代理mariadb实现读写分离,使用navcat12和mysql客户端连接dble端口 进入数据库会报错:
ERROR 5314 (HY000): can't connect to dbGroup[dbyewu
mysql> use carnet_base;
ERROR 1105 (HY000): java.lang.NullPointerException
dble错误日志:
com.actiontech.dble.net.ConnectionException: Access denied for user 'root'@'172.16.226.187' (using password: NO)
at com.actiontech.dble.services.mysqlauthenticate.MySQLBackAuthService.checkForResult(MySQLBackAuthService.java:207) ~[dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.mysqlauthenticate.MySQLBackAuthService.handleInnerData(MySQLBackAuthService.java:108) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.net.service.AbstractService.consumeSingleTask(AbstractService.java:189) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.BackendService.handleTaskQueue(BackendService.java:173) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.BackendService.access$300(BackendService.java:48) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.BackendService$BackendOnetimeRunnable.run(BackendService.java:647) [dble-3.22.07.0.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
2022-11-23 11:33:33.065 WARN [28-frontWorker] (com.actiontech.dble.services.rwsplit.RWSplitQueryHandler.query(RWSplitQueryHandler.java:156)) - execute error
java.lang.NullPointerException: null
at com.actiontech.dble.services.rwsplit.RWSplitHandler.execute(RWSplitHandler.java:57) ~[dble-3.22.07.0.jar:?]
at com.actiontech.dble.rwsplit.RWSplitNonBlockingSession.getRwSplitHandler(RWSplitNonBlockingSession.java:194) ~[dble-3.22.07.0.jar:?]
at com.actiontech.dble.rwsplit.RWSplitNonBlockingSession.execute(RWSplitNonBlockingSession.java:134) ~[dble-3.22.07.0.jar:?]
at com.actiontech.dble.rwsplit.RWSplitNonBlockingSession.execute(RWSplitNonBlockingSession.java:121) ~[dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.rwsplit.handle.RwSplitSelectHandler.handle(RwSplitSelectHandler.java:32) ~[dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.rwsplit.RWSplitQueryHandler.query(RWSplitQueryHandler.java:76) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.rwsplit.RWSplitService.handleComQuery(RWSplitService.java:258) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.rwsplit.RWSplitService.handleInnerData(RWSplitService.java:156) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.net.service.AbstractService.consumeSingleTask(AbstractService.java:189) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.FrontendService.consumeSingleTask(FrontendService.java:184) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.services.FrontendService.execute(FrontendService.java:139) [dble-3.22.07.0.jar:?]
at com.actiontech.dble.net.executor.FrontendBlockRunnable.run(FrontendBlockRunnable.java:70) [dble-3.22.07.0.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
mariadb那边错误日志也是报:
2022-11-23 10:09:12 6161 [Warning] Access denied for user 'root'@'172.16.226.187' (using password: NO)
我可以确认db.xml里面配置的数据库账号密码是正确的,因为我手动确认登录正常。
原因是当前版本 mariadb changeUser 报文处理有问题。升级 mariadb 到 10.4.27就可以解决。
最小复现步骤:
- 新建一根连接使用读写分离用户连接 dble
- 然后use 一个数据库, use XXX;
- 关闭该连接
- 新建一根连接使用读写分离用户连接 dble
- use 一个数据库, use XXX;
期望结果:
切换成功,日志中没有异常。
实际结果:
切换失败,日志中有空指针。
No connection. Trying to reconnect...
Connection id: 14
Current database: *** NONE ***