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

select server_status() 报错导致 服务 unable to establish connection #22885

Closed
MonkeyBrothers opened this issue Sep 13, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@MonkeyBrothers
Copy link

版本信息

1.taos的版本信息 3.0.4.1
2.jdbc的版本 3.2.1
3.druid连接池版本 1.2.11

问题描述

Java 应用程序报错 “sql: select server_status(), desc: unable to establish connection”

问题原因以及解决办法

因为使用了连接池,参考了官方的示例demo,配置了ValidationQuery
dataSource.setValidationQuery("select server_status()");
在多台机器的集群下,发现其中一个节点挂掉之后,高可用还是能保证的,但是这个 “select server_status()”校验就失败了,导致Java服务连接一直报错,影响业务。

解决办法就是关闭了检测校验:
validationQuery: null

文档是否需要做一个特殊的说明,或者其他的校验语句?

@MonkeyBrothers MonkeyBrothers added the enhancement New feature or request label Sep 13, 2023
@yu285
Copy link
Contributor

yu285 commented Sep 19, 2023

咱们能升级到最新版 3110 吗,驱动升级到 3025,如果还有这个现象可以加我 微信 a15652223354 我具体看下

@yu285 yu285 self-assigned this Sep 19, 2023
@yu285 yu285 closed this as completed Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants