yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.93k stars 1.06k forks source link

Enable 3.6 Cassandra/Datastax driver #611

Closed rkarthik007 closed 5 years ago

rkarthik007 commented 5 years ago

This resulted in the following exception in a user environment:

Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: 
All host(s) tried for query failed (tried: internal-a7ac5ba07f2bc11e8949d02f6c784b1f-1932237982.us-west-2.elb.amazonaws.com/X.X.X.X:9042 

(com.datastax.driver.core.exceptions.TransportException: [internal-a7ac5ba07f2bc11e8949d02f6c784b1f-1932237982.us-west-2.elb.amazonaws.com/X.X.X.X:9042] Error initializing connection: Unsupported option DRIVER_NAME = DataStax Java Driver), 
internal-a7ac5ba07f2bc11e8949d02f6c784b1f-1932237982.us-west-2.elb.amazonaws.com/X.X.X.X:9042 (com.datastax.driver.core.exceptions.TransportException: [internal-a7ac5ba07f2bc11e8949d02f6c784b1f-1932237982.us-west-2.elb.amazonaws.com/X.X.X.X:9042] Error initializing connection: Unsupported option DRIVER_NAME = DataStax Java Driver), 
internal-a7ac5ba07f2bc11e8949d02f6c784b1f-1932237982.us-west-2.elb.amazonaws.com/X.X.X.X:9042 (com.datastax.driver.core.exceptions.TransportException: [internal-a7ac5ba07f2bc11e8949d02f6c784b1f-1932237982.us-west-2.elb.amazonaws.com/X.X.X.X:9042] Error initializing connection: Unsupported option DRIVER_NAME = DataStax Java Driver))
    at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:268) ~[cassandra-driver-core-3.6.0.jar:na]
    at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:107) ~[cassandra-driver-core-3.6.0.jar:na]
    at com.datastax.driver.core.Cluster$Manager.negotiateProtocolVersionAndConnect(Cluster.java:1652) ~[cassandra-driver-core-3.6.0.jar:na]
    at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1571) ~[cassandra-driver-core-3.6.0.jar:na]
    at com.datastax.driver.core.Cluster.init(Cluster.java:208) ~[cassandra-driver-core-3.6.0.jar:na]
    at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:376) ~[cassandra-driver-core-3.6.0.jar:na]
    at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:355) ~[cassandra-driver-core-3.6.0.jar:na]
    at com.datastax.driver.core.Cluster.connect(Cluster.java:305) ~[cassandra-driver-core-3.6.0.jar:na]
    at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.connect(CassandraCqlSessionFactoryBean.java:89) ~[spring-data-cassandra-2.1.2.RELEASE.jar:2.1.2.RELEASE]
    at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.afterPropertiesSet(CassandraCqlSessionFactoryBean.java:82) ~[spring-data-cassandra-2.1.2.RELEASE.jar:2.1.2.RELEASE]
    at org.springframework.data.cassandra.config.CassandraSessionFactoryBean.afterPropertiesSet(CassandraSessionFactoryBean.java:59) ~[spring-data-cassandra-2.1.2.RELEASE.jar:2.1.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    ... 160 common frames omitted
hreidar commented 5 years ago

What driver version does work at the moment? I'm trying to connect with JetBrains Datagrip and I'm getting this same error: Error initializing connection: Unsupported option DRIVER_NAME = DataStax Java Driver

rkarthik007 commented 5 years ago

The 3.2 version is current, please see this docs link: https://docs.yugabyte.com/latest/develop/client-drivers/java/

hreidar commented 5 years ago

Hi, just so you have this info, it seems that JetBrains Datagrip is using Cassandra driver version 1.2.9 and it is giving the same error. I also tried to download your jar file (cassandra-driver-core-3.2.0.jar) but there I'm unable to choose a Class from their GUI

hreidar commented 5 years ago

Hi, I'm also trying to connect to YugaByte Cassandra API with ISC KEA DHCP where I used the lates Datastax driver from Github with KEA. I get similar error there: Unsupported option DRIVER_VERSION = 2.11.0

Here is all the error text from KEA:

1544781091.123 [ERROR] (src/cluster_connector.cpp:238:void cass::ClusterConnector::on_connect(cass::ControlConnector*)): Unable to establish a control connection to host 192.168.15.80 because of the following error: Underlying connection error: Received error response 'Unsupported option DRIVER_VERSION = 2.11.0' (0x0200000A)
2018-12-14 09:51:31.125 ERROR [kea-dhcp4.dhcp4/1] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /usr/local/etc/kea/kea-dhcp4.conf, reason: Unable to open database: Session action  failed, Kea error: CqlConnection::openDatabase(): cass_session_connect_keyspace() != CASS_OK, Cassandra error code: No hosts available, Cassandra future error: Underlying connection error: Received error response 'Unsupported option DRIVER_VERSION = 2.11.0' (0x0200000A)
2018-12-14 09:51:31.126 ERROR [kea-dhcp4.dhcp4/1] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/usr/local/etc/kea/kea-dhcp4.conf': Unable to open database: Session action  failed, Kea error: CqlConnection::openDatabase(): cass_session_connect_keyspace() != CASS_OK, Cassandra error code: No hosts available, Cassandra future error: Underlying connection error: Received error response 'Unsupported option DRIVER_VERSION = 2.11.0' (0x0200000A)
hreidar commented 5 years ago

The 3.2 version is current, please see this docs link: https://docs.yugabyte.com/latest/develop/client-drivers/java/

Hi, can you point me to a version of the Datastax driver located on their github site that should work with Yugabyte?

robertpang commented 5 years ago

@hreidar For cpp driver, we have tested version 2.9.0 and confirmed it is compatible with YugaByte DB. We are also addressing this "Unsupported option" error in YugaByte DB to enable it to work with new driver versions. Stay tuned.

robertpang commented 5 years ago

@hreidar We have just resolved this issue in YugaByte DB also in commit 685d1b2 by accepting unrecognized driver options. Please give that a try.

hreidar commented 5 years ago

Excellent work, tanks. BTW your product looks really good.

schoudhury commented 5 years ago

@hreidar i am the product guy at yugabyte. needless to say, i am very interested in learning more about the application (and its workload characteristics) that you intend to use yugabyte db for. would you be open to sharing that on this thread? we can have a short conf call if that works better.

hreidar commented 5 years ago

@schoudhury no problem, I can give you a short overview of the system we are working on.

My company, Gagnaveita Reykjavikur, is a wholesale network service provider providing other service providers with access to homes and companies over a fiber network. We are in the process of developing our own operations support system and our goal is to build a system that's easy to extend and operate so we are going from a legacy monolith system to a more modern microservice design, seen here below.

gross

The systems main responsibility is to manage services in our network and in order to do so it has to know its state and to be able to manipulate it accordingly. It is built out of various components which have different needs regarding DB backend and therefore we have been experimenting with some well-known candidates like Postgres, Redis, Kafka, and Cassandra. These experiments have directed me to your product and just the thought of being able to operate one backend instead of three is very appealing.

In our current design, I don't expect the workload to be extremely high but its good to know that you can effortlessly scale your backend if new demands will pop up.

schoudhury commented 5 years ago

thanks @hreidar for the detailed info. the event-driven microservices architecture you have highlighted seems like a great fit for your application. yugabyte db's inherent design intent is to simplify the data persistence layer of such microservices. glad you reached the same conclusion 👍 please keep us updated on the progress of your application dev & rollout. best wishes!

hreidar commented 5 years ago

@hreidar We have just resolved this issue in YugaByte DB also in commit 685d1b2 by accepting unrecognized driver options. Please give that a try.

Hi, @robertpang, have you released a version with this fix already? (on dockerhub) or do I need to build it myself?

rao-vasireddy commented 5 years ago

Hi @hreidar , We will be pushing a release out with the fix in the next few days.

rao-vasireddy commented 5 years ago

@hreidar, a build (1.1.10.0-b3) with this fix has been released. dockerhub as well as our downloads repo should have this.

hreidar commented 5 years ago

Excellent thanks.

Kveðja/regards, Hreiðar.

On Tue, Jan 15, 2019 at 11:06 PM rao-vasireddy notifications@github.com wrote:

@hreidar https://github.com/hreidar, a build (1.1.10.0-b3) with this fix has been released. dockerhub as well as our downloads repo should have this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/YugaByte/yugabyte-db/issues/611#issuecomment-454586589, or mute the thread https://github.com/notifications/unsubscribe-auth/AHRw3qlzpW9OX37OO3ct9m_LYmpQs99dks5vDl8IgaJpZM4Y4Q5o .