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

druid连接池校验连接不定时出现 “Unable to establish connection” #27784

Open
hombooo opened this issue Sep 10, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@hombooo
Copy link

hombooo commented Sep 10, 2024

Bug Description
druid连接池校验连接不定时出现 “Unable to establish connection”,程序中业务SQL还在正常执行,但同时druid连接池在校验时却获取不到连接,是否是bug?

To Reproduce
Steps to reproduce the behavior:

  1. 业务日志:
 2024-09-09 22:19:45,642 ERROR [Druid-ConnectionPool-Create-448243316] c.alibaba.druid.pool.DruidDataSource [DruidDataSource.java : 2815] create connection SQLException, url: jdbc:TAOS://151.50.8.22:6030/landun_db_22?charset=UTF-8&locale=en_US.UTF-8&timezone=UTC-8, errorCode -2147483637, state 
java.sql.SQLException: TDengine ERROR (0x8000000b): Unable to establish connection
 at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
 at com.taosdata.jdbc.TSDBJNIConnector.executeQuery(TSDBJNIConnector.java:183)
 at com.taosdata.jdbc.TSDBStatement.executeQueryImpl(TSDBStatement.java:76)
 at com.taosdata.jdbc.TSDBStatement.executeQuery(TSDBStatement.java:59)
 at com.taosdata.jdbc.TSDBStatement.executeQuery(TSDBStatement.java:39)
 at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1419)
 at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1719)
 at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2813)
[] 2024-09-09 22:19:45,659 ERROR [Druid-ConnectionPool-Create-1432184492] c.alibaba.druid.pool.DruidDataSource [DruidDataSource.java : 2815] create connection SQLException, url: jdbc:TAOS://151.50.1.74:6030/landun_db_hb_gps?charset=UTF-8&locale=en_US.UTF-8&timezone=UTC-8, errorCode -2147483637, state 
java.sql.SQLException: TDengine ERROR (0x8000000b): Unable to establish connection
 at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
 at com.taosdata.jdbc.TSDBJNIConnector.executeQuery(TSDBJNIConnector.java:183)
 at com.taosdata.jdbc.TSDBStatement.executeQueryImpl(TSDBStatement.java:76)
 at com.taosdata.jdbc.TSDBStatement.executeQuery(TSDBStatement.java:59)
 at com.taosdata.jdbc.TSDBStatement.executeQuery(TSDBStatement.java:39)
 at com.alibaba.druid.pool.DruidAbstractDataSource.validateConnection(DruidAbstractDataSource.java:1419)
 at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:17
  1. 客户端日志:
09/09 22:19:44.656856 00024564 TSC ERROR 0x31b8a0 error occurs, code:Unable to establish connection, return to user app, reqId:0x72968727a290cd22
09/09 22:19:44.656872 00024578 JNI ERROR jobj:0x7ff4c07ec710, conn:0x7ff3fc002650, code:0x8000000b, msg:Unable to establish connection
09/09 22:19:45.140282 00024595 TSC connecting to server, numOfEps:1 inUse:0 user:landun_user db:landun_db_22 key:landun_user:ea8197e57e6fb4172b10369fc2efe880:151.50.8.22:6030
09/09 22:19:45.140292 00024595 TSC ep:0, 151.50.8.22:6030
09/09 22:19:45.140965 00024567 TSC ERROR 0x31b8a2 error occurs, code:Unable to establish connection, return to user app, reqId:0x72968727a474cd24
09/09 22:19:45.141001 00024595 JNI ERROR jobj:0x7ff42c17b710, conn:0x7ff434002820, code:0x8000000b, msg:Unable to establish connection
09/09 22:19:45.157203 00024578 TSC connecting to server, numOfEps:1 inUse:0 user:zcdj_user db:landun_db_hb_gps key:zcdj_user:3d05286baefa4ee6b68c163e55bdf834:151.50.1.74:6030
09/09 22:19:45.157210 00024578 TSC ep:0, 151.50.1.74:6030
09/09 22:19:45.157892 00024561 TSC ERROR 0x31b8a4 error occurs, code:Unable to establish connection, return to user app, reqId:0x72968727a485cd26
09/09 22:19:45.157922 00024578 JNI ERROR jobj:0x7ff4c07ec710, conn:0x7ff3fc002f20, code:0x8000000b, msg:Unable to establish connection
09/09 22:19:45.641483 00024595 TSC connecting to server, numOfEps:1 inUse:0 user:landun_user db:landun_db_22 key:landun_user:ea8197e57e6fb4172b10369fc2efe880:151.50.8.22:6030
09/09 22:19:45.641491 00024595 TSC ep:0, 151.50.8.22:6030
09/09 22:19:45.642164 00024563 TSC ERROR 0x31b8a6 error occurs, code:Unable to establish connection, return to user app, reqId:0x72968727a66acd28
09/09 22:19:45.642187 00024595 JNI ERROR jobj:0x7ff42c17b710, conn:0x7ff434002210, code:0x8000000b, msg:Unable to establish connection
09/09 22:19:45.658248 00024578 TSC connecting to server, numOfEps:1 inUse:0 user:zcdj_user db:landun_db_hb_gps key:zcdj_user:3d05286baefa4ee6b68c163e55bdf834:151.50.1.74:6030
09/09 22:19:45.658256 00024578 TSC 

Environment (please complete the following information):

  • TDengine Version [3.2.0.0]
  • taos-jdbcdriver [3.2.7]
@hombooo hombooo added the bug Something isn't working label Sep 10, 2024
@trdmm
Copy link

trdmm commented Sep 23, 2024

怎么解决的

@yu285
Copy link
Contributor

yu285 commented Sep 23, 2024

如果是时不时出现,可能是服务端出现了问题。建议先升级一下服务端再观察一下。

目前最新版是3.3.2.0,是三个月前的版本,建议等月底发版的 3.3.3.0 ,各方面都会更好些。如果急用的话,可以自己编译main分支。

@hombooo
Copy link
Author

hombooo commented Oct 10, 2024

怎么解决的

连接池小了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants