Janus not able to connect to cassandra

45 views
Skip to first unread message

Bharat Dighe

unread,
Sep 25, 2019, 6:58:22 PM9/25/19
to JanusGraph users
I am using cql driver.

I am getting below  while opening connection. The C* is running on the localhost and listening on port 9042.
Cassandra version is 3.11.3

Connection Parameters:
storage.backend=cql
storage.cassandra.read-consistency-level=LOCAL_QUORUM
storage.cassandra.write-consistency-level=LOCAL_QUORUM
storage.read-only=true
storage.hostname=localhost
storage.cassandra.keyspace=my_ks
query.fast-property=true
query.force-index=true


>>netstat -an|grep 9042
tcp        0      0 0.0.0.0:9042                0.0.0.0:*                   LISTEN

It works fine when I use thrift driver.

What I am missing? Following is the exception

java.lang.IllegalArgumentException: Could not instantiate implementation: org.janusgraph.diskstorage.cql.CQLStoreManager
        at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:64) ~[janusgraph-core-0.4.0.jar:?]
        at org.janusgraph.diskstorage.Backend.getImplementationClass(Backend.java:440) ~[janusgraph-core-0.4.0.jar:?]
        at org.janusgraph.diskstorage.Backend.getStorageManager(Backend.java:411) ~[janusgraph-core-0.4.0.jar:?]
        at org.janusgraph.graphdb.configuration.builder.GraphDatabaseConfigurationBuilder.build(GraphDatabaseConfigurationBuilder.java:50) ~[janusgraph-core-0.4.0.jar:?]
        at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:161) ~[janusgraph-core-0.4.0.jar:?]
        at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:132) ~[janusgraph-core-0.4.0.jar:?]
        at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:112) ~[janusgraph-core-0.4.0.jar:?]
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedConstructorAccessor25.newInstance(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_222]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_222]
        at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:58) ~[janusgraph-core-0.4.0.jar:?]
        ... 11 more
Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/127.0.0.1:9042 (com.datastax.driver.core.exceptions.TransportException: [localhost/127.0.0.1:9042] Connection has been closed))
        at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:268) ~[cassandra-driver-core-3.7.1.jar:?]
        at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:107) ~[cassandra-driver-core-3.7.1.jar:?]
        at com.datastax.driver.core.Cluster$Manager.negotiateProtocolVersionAndConnect(Cluster.java:1652) ~[cassandra-driver-core-3.7.1.jar:?]
        at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1571) ~[cassandra-driver-core-3.7.1.jar:?]
        at com.datastax.driver.core.Cluster.init(Cluster.java:208) ~[cassandra-driver-core-3.7.1.jar:?]




akhilesh singh

unread,
Sep 25, 2019, 10:28:57 PM9/25/19
to janusgra...@googlegroups.com
Can you disable thrift on Cassandra and then try

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/ab171f64-d3c8-4f16-a630-81de43891894%40googlegroups.com.

Bharat Dighe

unread,
Sep 26, 2019, 2:35:44 PM9/26/19
to JanusGraph users
Didnt help.

Could this be a driver 3.7.1 compatibility issue with cassandra 3.11.3?

Thanks
Bharat
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@googlegroups.com.

Florian Hockmann

unread,
Sep 27, 2019, 3:53:23 AM9/27/19
to JanusGraph users
Not sure if that can cause your problem but you need to configure storage.cql.keyspace instead of storage.cassandra.keyspace if you're using CQL and the same applies to the consistency levels.

Bharat Dighe

unread,
Sep 27, 2019, 7:22:02 PM9/27/19
to JanusGraph users
Found the issue. It was due to inclusion of netty-transport-native-epoll via another application dependency. It seems cassandra core driver 3.7.1 does not like if this library is present in the classpath.


Thanks
Bharat
Reply all
Reply to author
Forward
0 new messages