Open jackie-linz opened 3 months ago
We believe we solved this with https://issues.redhat.com/browse/JGRP-2756 and therefore with Infinispan 14.0.25.Final and Infinispan 15.0.0.Final What version of the image are you using ?
I was using quay.io/infinispan/server:14.0
and quay.io/infinispan/server:15.0
.
I've just tried quay.io/infinispan/server:14.0.25.Final
, here's the full stack trace
ERROR (main) [org.jgroups.protocols.JDBC_PING] JGRP000115: Could not open connection to database java.sql.SQLException: No suitable driver found for jdbc:postgresql://dbhost:5432/db
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:706)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229)
at org.jgroups.protocols.JDBC_PING.getConnection(JDBC_PING.java:285)
at org.jgroups.protocols.JDBC_PING.attemptSchemaInitialization(JDBC_PING.java:250)
at org.jgroups.protocols.JDBC_PING.init(JDBC_PING.java:111)
at org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:802)
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:442)
at org.jgroups.JChannel.init(JChannel.java:902)
at org.jgroups.JChannel.<init>(JChannel.java:124)
at org.infinispan.remoting.transport.jgroups.EmbeddedJGroupsChannelConfigurator.createChannel(EmbeddedJGroupsChannelConfigurator.java:80)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.channelFromConfigurator(JGroupsTransport.java:763)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.buildChannel(JGroupsTransport.java:734)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannel(JGroupsTransport.java:488)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:472)
at org.infinispan.remoting.transport.jgroups.CorePackageImpl$2.start(CorePackageImpl.java:63)
at org.infinispan.remoting.transport.jgroups.CorePackageImpl$2.start(CorePackageImpl.java:49)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeStart(BasicComponentRegistryImpl.java:616)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:607)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:576)
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:807)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:634)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:598)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:576)
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:807)
at org.infinispan.factories.GlobalComponentRegistry.preStart(GlobalComponentRegistry.java:284)
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:250)
at org.infinispan.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:779)
at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:747)
at org.infinispan.server.SecurityActions.lambda$startCacheManager$1(SecurityActions.java:68)
at org.infinispan.security.Security.doPrivileged(Security.java:56)
at org.infinispan.server.SecurityActions.doPrivileged(SecurityActions.java:40)
at org.infinispan.server.SecurityActions.startCacheManager(SecurityActions.java:71)
at org.infinispan.server.Server.run(Server.java:425)
at org.infinispan.server.Bootstrap.runInternal(Bootstrap.java:173)
at org.infinispan.server.tool.Main.run(Main.java:98)
at org.infinispan.server.Bootstrap.main(Bootstrap.java:56)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.infinispan.server.loader.Loader.run(Loader.java:106)
at org.infinispan.server.loader.Loader.main(Loader.java:51)
quay.io/infinispan/server:15.0.0.Final
produced the same error
ERROR (main) [org.jgroups.protocols.JDBC_PING] JGRP000115: Could not open connection to database java.sql.SQLException: No suitable driver found for jdbc:postgresql://dbhost:5432/db
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:708)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:230)
at org.jgroups.protocols.JDBC_PING.getConnection(JDBC_PING.java:290)
at org.jgroups.protocols.JDBC_PING.attemptSchemaInitialization(JDBC_PING.java:255)
at org.jgroups.protocols.JDBC_PING.init(JDBC_PING.java:112)
at org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:806)
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:442)
at org.jgroups.JChannel.init(JChannel.java:894)
at org.jgroups.JChannel.<init>(JChannel.java:124)
at org.infinispan.remoting.transport.jgroups.EmbeddedJGroupsChannelConfigurator.createChannel(EmbeddedJGroupsChannelConfigurator.java:80)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.channelFromConfigurator(JGroupsTransport.java:739)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.buildChannel(JGroupsTransport.java:710)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.initChannel(JGroupsTransport.java:464)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.start(JGroupsTransport.java:448)
at org.infinispan.remoting.transport.jgroups.CorePackageImpl$2.start(CorePackageImpl.java:64)
at org.infinispan.remoting.transport.jgroups.CorePackageImpl$2.start(CorePackageImpl.java:49)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeStart(BasicComponentRegistryImpl.java:616)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:607)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:576)
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:807)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startDependencies(BasicComponentRegistryImpl.java:634)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.doStartWrapper(BasicComponentRegistryImpl.java:598)
at org.infinispan.factories.impl.BasicComponentRegistryImpl.startWrapper(BasicComponentRegistryImpl.java:576)
at org.infinispan.factories.impl.BasicComponentRegistryImpl$ComponentWrapper.running(BasicComponentRegistryImpl.java:807)
at org.infinispan.factories.GlobalComponentRegistry.preStart(GlobalComponentRegistry.java:307)
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:241)
at org.infinispan.manager.DefaultCacheManager.internalStart(DefaultCacheManager.java:779)
at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:747)
at org.infinispan.server.SecurityActions.lambda$startCacheManager$0(SecurityActions.java:41)
at org.infinispan.security.Security.doPrivileged(Security.java:62)
at org.infinispan.server.SecurityActions.startCacheManager(SecurityActions.java:43)
at org.infinispan.server.Server.run(Server.java:446)
at org.infinispan.server.Bootstrap.runInternal(Bootstrap.java:184)
at org.infinispan.server.tool.Main.run(Main.java:98)
at org.infinispan.server.Bootstrap.main(Bootstrap.java:67)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.infinispan.server.loader.Loader.run(Loader.java:104)
at org.infinispan.server.loader.Loader.main(Loader.java:49)
here's a repo with docker compose file that reproduces the issue
hmm... interestingly, adding SERVER_LIBS_DIR=/opt/infinispan
environment variable works, but maybe not how it's intended?
It seems like Java's DriverManager
doesn't let classes loaded from another ClassLoader
see drivers loaded from a different ClassLoader
. I need to reopen JGRP-2756
I have implemented a better fix: https://github.com/infinispan/infinispan/pull/12258
Hi, thanks for the great work in putting together this image.
I'm trying to get the cluster working with
JDBC_PING
and keeps having trouble with it.Here's my jgroups stack config:
first error is easy to understand - missing postgres driver
Caused by: java.lang.IllegalArgumentException: JDBC Driver required for JDBC_PING protocol could not be loaded: 'org.postgresql.Driver'
So I've added
SERVER_LIBS="org.postgresql:postgresql:42.6.2"
environment variable to the container and I can see that the driver got loaded:but then it still errors:
Any hint on how I can get this image working with
JDBC_PING
? 🙏