简体   繁体   中英

HikariCP connection pool trying to connect to very old connections

I'm using HikariCP, configured as a HikariConfig bean passed to a HikariDataSource. Environment is Fuse 7.3 (OSGi).

This has been working for years.

Today, I found errors in the logs showing it trying to connect to some ancient database URLs, that we haven't used for a while.

I've searched the code, and the OSGi config. Those old database URLs are nowhere to be found.

The only thing I can think of is that there are a few ancient connections in the pool, and that the pool connection strings gets saved to disk, somehow, and reloaded even after shutdown and startup.

But it should really be impossible, for hikariCP to be trying to connect to these old URLs. It's been years since the config referenced these URLs.

Any idea how this might be happening?

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the host qa01, named instance authdb failed. Error: "java.net.SocketTimeoutException: Receive timed out". Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434.  For SQL Server 2005 or later, verify that the SQL Server Browser Service is running on the host.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:206)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.getInstancePort(SQLServerConnection.java:5294)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.primaryPermissionCheck(SQLServerConnection.java:1859)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1596)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1447)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:788)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(SQLServerDataSource.java:719)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(SQLServerDataSource.java:71)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:341)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:193)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:428)
at com.zaxxer.hikari.pool.HikariPool.access$300(HikariPool.java:70)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:612)
at com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator.call(HikariPool.java:598)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)

The only thing that I could think to do would be to find out which bundle is responsible (stop/start bundles and see which one produces the error). Maybe there is a config file in the bundle. Look down into deployed bundle/cache directory and see what is in there. It may well turn out that the bundle in question is for testing and is not needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM