Open z0mb1ek opened 4 years ago
Connection is ok
@z0mb1ek
1) To confirm, you are using this with YB version of drivers or Apache Cassandra drivers?
2) Looks like the yb-tserver process might have crashed. We'll need to look at the yb-tserver log files to see if there's a FATAL, .err or core file; that should give us clues.
@kmuthukk
@kmuthukk
E0412 16:42:52.774022 107 process_context.cc:180] SQL Error: Object Not Found SELECT FROM system.peers_v2 ^^^^^^^^^^^^^^^ E0412 16:42:52.774062 107 process_context.cc:180] SQL Error: Server Error. Unknown keyspace/cf pair (system.peers_v2) SELECT FROM system.peers_v2 ^^^^^^
The error seems to be correc here: "Unknown keyspace/cf pair (system.peers_v2)"
based on the generic cassandra driver here: https://github.com/datastax/java-driver/blob/4.x/core/src/main/java/com/datastax/oss/driver/internal/core/metadata/DefaultTopologyMonitor.java#L186
But the driver used here is the CassandraJDbc driver. Shouldn't that be done here?
I think driver is here https://github.com/DataGrip/cassandra-jdbc-driver/releases
any news? don't want to buy table plus(
I didn't get time to look at this. I will get to it ASAP and get you more info..
So looks like this is the issue that is happening on the Datagrip side:
[localhost/127.0.0.1:9042] Connection has been closed
The SQL statement:
SELECT keyspace_name, durable_writes, toJson(replication) as replication
FROM system_schema.keyspaces
is failing with the stack trace and the log message as:
2020-04-26 18:54:50,194 [ 400265] WARN - lij.database.util.ErrorHandler - [localhost/127.0.0.1:9042] Connection has been closed
[localhost/127.0.0.1:9042] Connection has been closed
The SQL statement:
SELECT keyspace_name, durable_writes, toJson(replication) as replication
FROM system_schema.keyspaces
at com.intellij.database.remote.jdba.jdbc.dialects.CassandraExceptionRecognizer.recognizeSpecificException(CassandraExceptionRecognizer.java:28)
at com.intellij.database.remote.jdba.jdbc.BaseExceptionRecognizer.recognizeException(BaseExceptionRecognizer.java:44)
at com.intellij.database.remote.jdba.jdbc.JdbcIntermediateSession.recognizeException(JdbcIntermediateSession.java:387)
at com.intellij.database.remote.jdba.jdbc.JdbcIntermediateSimpleSeance.<init>(JdbcIntermediateSimpleSeance.java:27)
at com.intellij.database.remote.jdba.jdbc.JdbcIntermediateSession.openSimpleStatementSeance(JdbcIntermediateSession.java:138)
at com.intellij.database.remote.jdba.jdbc.JdbcIntermediateSession.openSeance(JdbcIntermediateSession.java:126)
at com.intellij.database.remote.jdba.jdbc.dialects.CassandraIntermediateSession.openSeance(CassandraIntermediateSession.java:38)
at com.intellij.database.remote.jdba.jdbc.dialects.CassandraIntermediateSession.openSeance(CassandraIntermediateSession.java:16)
at com.intellij.database.remote.jdba.impl.RemoteSessionImpl.openSeance(RemoteSessionImpl.java:38)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
But when I ran the same on the cqlsh shell It worked fine:
cqlsh> SELECT keyspace_name, durable_writes, toJson(replication) as replication FROM system_schema.keyspaces;
keyspace_name | durable_writes | replication
---------------+----------------+----------------------------------------------------------------------------------
system | True | {"class":"org.apache.cassandra.locator.SimpleStrategy","replication_factor":"1"}
system_schema | True | {"class":"org.apache.cassandra.locator.SimpleStrategy","replication_factor":"1"}
system_auth | True | {"class":"org.apache.cassandra.locator.SimpleStrategy","replication_factor":"1"}
Going to debug this a bit more and figure out what is the format they they are expecting the data to be in.
Hi, can I kindly check if there is an update for this issue? Many thanks!
Interesting, I can run this query from the DataGrip console without the toJson()
function:
SELECT keyspace_name, durable_writes, replication as replication FROM system_schema.keyspaces;
When I add toJson()
, I get this error message:
+1:
==> yb-tserver.WARNING <==
W0503 18:54:55.304661 4896 cql_processor.cc:387] Unsupported driver option DRIVER_NAME = DataStax Java Driver
^^^^^^^^^^^^^^^
+2:
==> yb-tserver.WARNING <==
W0503 19:05:31.831157 4894 cql_processor.cc:387] Unsupported driver option DRIVER_NAME = DataStax Java Driver
W0503 19:05:31.841301 4554 client-internal.cc:1476] GetTableSchemaRpc(table_identifier: table_name: "peers_v2" namespace { name: "system" database_type: YQL_DATABASE_CQL }, num_attempts: 1) failed: Not found (yb/master/catalog_manager.cc:5500): Table system.peers_v2 not found: OBJECT_NOT_FOUND (master error 3)
W0503 19:05:31.841348 4896 process_context.cc:184] SQL Error: Object Not Found
SELECT * FROM system.peers_v2
^^^^^^^^^^^^^^^
Hmm... I was able to get it working with this driver, but the fields still don't load.
https://mvnrepository.com/artifact/com.yugabyte/cassandra-jdbc-wrapper
Jira Link: DB-4675 Hi. Cannot get schemas for database.