java-spring-jaeger icon indicating copy to clipboard operation
java-spring-jaeger copied to clipboard

"PoolInitializationException: Failed to initialize pool: Timer already cancelled" for Oracle

Open brianrodecap opened this issue 5 years ago • 9 comments

Dependency update from opentracing-spring-jaeger-cloud-starter:3.0.0 to opentracing-spring-jaeger-cloud-starter:3.1.0 or 3.1.1 results in the following error for Oracle data sources from /actuator/health endpoint:

"DataSource health check failed com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Timer already cancelled. [90 skipped] Caused by: java.lang.IllegalStateException: Timer already cancelled. at java.base/java.util.Timer.sched(Timer.java:398) ~[na:na] at java.base/java.util.Timer.schedule(Timer.java:194) ~[na:na] at oracle.net.nt.TimeoutInterruptHandler.scheduleInterrupt(TimeoutInterruptHandler.java:90) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.nt.TimeoutInterruptHandler.scheduleInterrupt(TimeoutInterruptHandler.java:103) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.nt.TimeoutSocketChannel.scheduleInterrupt(TimeoutSocketChannel.java:235) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.nt.TimeoutSocketChannel.connect(TimeoutSocketChannel.java:97) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.nt.TimeoutSocketChannel.(TimeoutSocketChannel.java:77) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:192) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.nt.ConnOption.connect(ConnOption.java:174) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:510) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:548) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:682) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] at oracle.net.ns.NSProtocol.connect(NSProtocol.java:309) ~[ojdbc8-19.3.0.0.jar:19.3.0.0.0] [100 skipped] ... 88 common frames omitted "

brianrodecap avatar Mar 13 '20 16:03 brianrodecap

Would you be able to provide a reproducer?

Thanks

geoand avatar Mar 15 '20 20:03 geoand

@geoand I have similar issue with Oracle JDBC driver + Hikari Pool and Jdbc opentracing. I have created reproducer repo https://github.com/ash1425/opentracing-jdbc-issue-reproduce

ash1425 avatar May 01 '20 08:05 ash1425

Any updates? I have the same issue on 3.1.2

linarkou avatar Jul 29 '20 10:07 linarkou

The same problem here. Tested on 3.2.2 and still no luck. Fixing this would be highly appreciated.

mendreuk avatar Oct 23 '20 15:10 mendreuk

@geoand It would be great if you could look at it. Please use the reproducer code I created at https://github.com/ash1425/opentracing-jdbc-issue-reproduce.git

ash1425 avatar Nov 02 '20 23:11 ash1425

Thanks for the reproducer.

Unfortunately at this moment I am very pressed for time... Hopefully I'll take a look soon.

geoand avatar Nov 03 '20 06:11 geoand

This was fixed by https://github.com/opentracing-contrib/java-jdbc/issues/73 and is available in version 0.2.11 of opentracing-jdbc. I have tested it with 3.1.1 of this project and it should also work fine with 3.1.2-SNAPSHOT.

drallen avatar Mar 11 '21 15:03 drallen

This should resolve this issue: implementation('io.opentracing.contrib:opentracing-jdbc') { version { strictly '0.2.11' } }

luizpinheirodev avatar Jun 28 '21 12:06 luizpinheirodev

I can confirm above solution works. Issue can be closed.

ash1425 avatar Jul 15 '21 13:07 ash1425