使用JDBC驱动程序从SquirrelSQL连接到Cassandra进行SSL设置

时间:2018-06-10 22:47:40

标签: ssl jdbc cassandra-3.0 squirrel-sql

我正在尝试使用SquirrelSQL连接到Cassandra - 我尝试使用两个JDBC驱动程序 - Twig驱动程序以及this link https://github.com/zhicwu/cassandra-jdbc-driver处的驱动程序。当我在SquirrelSQL中设置别名和驱动程序并单击Connect按钮时,我得到下面的堆栈跟踪。

如何使用SquirrellSQL连接到Cassandra?

java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLException: java.lang.RuntimeException: com.github.cassandra.jdbc.internal.google.common.util.concurrent.UncheckedExecutionException: com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /XXX.XX.XX.XX:9042 (com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.TransportException: [/XXX.XX.XX.XX:9042] Connection has been closed))
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:206)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(Unknown Source)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(Unknown Source)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.sql.SQLException: java.lang.RuntimeException: com.github.cassandra.jdbc.internal.google.common.util.concurrent.UncheckedExecutionException: com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /XXX.XX.XX.XX:9042 (com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.TransportException: [/XXX.XX.XX.XX:9042] Connection has been closed))
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(Unknown Source)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(Unknown Source)
    at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(Unknown Source)
    ... 5 more
Caused by: java.sql.SQLException: java.lang.RuntimeException: com.github.cassandra.jdbc.internal.google.common.util.concurrent.UncheckedExecutionException: com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /XXX.XX.XX.XX:9042 (com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.TransportException: [/XXX.XX.XX.XX:9042] Connection has been closed))
    at com.github.cassandra.jdbc.CassandraDriver.createConnection(CassandraDriver.java:69)
    at com.github.cassandra.jdbc.CassandraDriver.connect(CassandraDriver.java:111)
    at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(Unknown Source)
    ... 8 more
Caused by: java.lang.RuntimeException: com.github.cassandra.jdbc.internal.google.common.util.concurrent.UncheckedExecutionException: com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /XXX.XX.XX.XX:9042 (com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.TransportException: [/XXX.XX.XX.XX:9042] Connection has been closed))
    at com.github.cassandra.jdbc.provider.datastax.DataStaxSessionFactory.getSession(DataStaxSessionFactory.java:202)
    at com.github.cassandra.jdbc.provider.datastax.DataStaxSessionFactory.getSession(DataStaxSessionFactory.java:177)
    at com.github.cassandra.jdbc.provider.datastax.CassandraConnection.<init>(CassandraConnection.java:61)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.github.cassandra.jdbc.CassandraDriver.createConnection(CassandraDriver.java:67)
    ... 10 more
Caused by: com.github.cassandra.jdbc.internal.google.common.util.concurrent.UncheckedExecutionException: com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /XXX.XX.XX.XX:9042 (com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.TransportException: [/XXX.XX.XX.XX:9042] Connection has been closed))
    at com.github.cassandra.jdbc.internal.google.common.cache.LocalCache$Segment.get(LocalCache.java:2207)
    at com.github.cassandra.jdbc.internal.google.common.cache.LocalCache.get(LocalCache.java:3953)
    at com.github.cassandra.jdbc.internal.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4790)
    at com.github.cassandra.jdbc.provider.datastax.DataStaxSessionFactory.getSession(DataStaxSessionFactory.java:186)
    ... 17 more
Caused by: com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /XXX.XX.XX.XX:9042 (com.github.cassandra.jdbc.internal.datastax.driver.core.exceptions.TransportException: [/XXX.XX.XX.XX:9042] Connection has been closed))
    at com.github.cassandra.jdbc.internal.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:232)
    at com.github.cassandra.jdbc.internal.datastax.driver.core.ControlConnection.connect(ControlConnection.java:79)
    at com.github.cassandra.jdbc.internal.datastax.driver.core.Cluster$Manager.negotiateProtocolVersionAndConnect(Cluster.java:1600)
    at com.github.cassandra.jdbc.internal.datastax.driver.core.Cluster$Manager.init(Cluster.java:1518)
    at com.github.cassandra.jdbc.internal.datastax.driver.core.Cluster.getMetadata(Cluster.java:399)
    at com.github.cassandra.jdbc.provider.datastax.DataStaxSessionFactory.newSession(DataStaxSessionFactory.java:163)
    at com.github.cassandra.jdbc.provider.datastax.DataStaxSessionFactory.access$000(DataStaxSessionFactory.java:45)
    at com.github.cassandra.jdbc.provider.datastax.DataStaxSessionFactory$2.call(DataStaxSessionFactory.java:188)
    at com.github.cassandra.jdbc.provider.datastax.DataStaxSessionFactory$2.call(DataStaxSessionFactory.java:186)
    at com.github.cassandra.jdbc.internal.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4793)
    at com.github.cassandra.jdbc.internal.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
    at com.github.cassandra.jdbc.internal.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
    at com.github.cassandra.jdbc.internal.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
    at com.github.cassandra.jdbc.internal.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
    ... 20 more

谢谢

0 个答案:

没有答案