Questions tagged [cassandra-driver]

Apache Cassandra drivers for variety of programming languages

88 questions
7
votes
1 answer

cassandra.cluster.NoHostAvailable: Unable to connect [..] timed out

I am trying to access a remote Cassandra cluster using python cassandra-driver like this: cluster = Cluster(['192.168.19.1'], port=9042) session = cluster.connect() However, it gives me: cassandra.cluster.NoHostAvailable: ('Unable to connect to any…
jOasis
  • 394
  • 2
  • 10
  • 32
6
votes
2 answers

Which Cassandra Python driver works with aiohttp?

The question is which Cassandra Python driver is better to use with aiohttp web framework. Currently, there are two possible candidates: cassandra-driver by DataStax aiocassandra The thing is, cassandra-driver seems to be more popular and has more…
Vladryaid
  • 87
  • 1
  • 8
5
votes
4 answers

What should I use for localDataCenter in Cassandra-Driver 4.x

When I was using cassandra-driver version 3.x everything worked fine. Now that I have upgraded I get the following message... Error: ArgumentError: 'localDataCenter' is not defined in Client options and also was not specified in constructor. At…
JGleason
  • 3,067
  • 6
  • 20
  • 54
5
votes
1 answer

Kafka-cassandra connector fails after confluent 3.3 upgrade

The Cassandra connector fails after confluent upgrade to 3.3.0. The version of Cassandra driver is 3.3. The stack is given below. [2017-09-14 08:56:28,123] ERROR java.lang.reflect.InvocationTargetException…
4
votes
2 answers

Cassandra: unconfigured table

TLDR; A table is still inaccessible while system_schema.tables already contains a record respective the table I'm trying to use Cassandra concurrently. Cassandra version: [cqlsh 5.0.1 | Cassandra 3.11.3 | CQL spec 3.4.4 | Native protocol v4] I have…
Symon
  • 1,626
  • 1
  • 23
  • 31
4
votes
1 answer

NoHostAvailableError: All host(s) tried for query failed

I've installed Cassandra on one EC2 instance that contains one keyspace with SimpleStrategy and replcation factor 1. I've also made port 9042 accessible from anywhere in the security group. I have a Node.js application that contains the following…
Alon
  • 10,381
  • 23
  • 88
  • 152
3
votes
1 answer

Cassandra hosted on docker connection to NodeJS returns NoHostAvailableError or ECONNREFUSED

I have a Cassandra db hosted on a docker container, created using the following command: docker run -d --name cassandra-docker -p 9842:9842 cassandra I created keyspaces, tables, uploaded data, etc. And all's been working fine in the bash and…
3
votes
1 answer

Cassandra paging on a primary key list does not work

I have a problem with the pagination in cassandra with python connector. I would like to paginate on a list of primary keys. Here is the schema of the table: client_data.store ( id text PRIMARY KEY, "additionalCols" text, format text, …
3
votes
2 answers

Cassandra Node.js driver memory leak when UPDATE counter

Trying to migrate counter tables. Reading every row from source table and writing the result to a new table. When writing milions of rows problem with js is running out of heap memory. Syncronous code is being used to make sure row is written before…
3
votes
1 answer

CassandraEntityBase in C# DataStax Driver

I have a .net core application which persists data to a Cassandra instance through DataStax driver. I have a base class for my Cassandra entities. Now if I want to take my TimeUUID type id into this base class, when inserting I get the error: Some…
Doruk
  • 884
  • 9
  • 25
3
votes
1 answer

How to handle timeouts in Cassandra + AWS Lambda

I've a Lambda function with VPC that connecting to Cassandra. I think that because of cold-start or other issue it can't connect to the Cassandra at all, the Lambda have timeout of 10s, I want to add timeout for the Cassandra as well, if the first…
Rafael Mor
  • 626
  • 1
  • 7
  • 21
2
votes
1 answer

Cassandra-driver Client.batch() gives RangeError

This code const cassandra = require('cassandra-driver'); const Long = require('cassandra-driver').types.Long; const client = new cassandra.Client({ contactPoints: ['localhost:9042'], localDataCenter: 'datacenter1', keyspace: 'ks' }); let q…
Siavoshkc
  • 346
  • 2
  • 16
2
votes
1 answer

Strict column checking in Datastax java driver 4 causing problems

Below is our entity class @Entity(defaultKeyspace = CASSANDRA_KEYSPACE) @CqlName(CASSANDRA_TABLE) public static class Scientist implements Serializable { @CqlName("person_name") public String name; …
2
votes
2 answers

connecting cassandra through ssl with datastax cassandra JAVA driver

I am using datastax cassandra version 3.6.0 and trying to connect to cassandra with ssl. I have a ca cert already stored in dir "/etc/ssl/certs/cassandra.crt". I have a cassandra cluster creation in JAVA as: cluster =…
Programmer
  • 117
  • 2
  • 14
2
votes
1 answer

Problem with python driver in Cassandra when use prepared statements

when I want to update a set item in Cassandra table with python code like following ps = session.prepare( """ UPDATE test,tbl SET val = val + {'?'} where name = ? and id = ?;""" ) bs = bind(ps, ['name', 'name', 1]) session.execute(bs) I got…
ghanad
  • 68
  • 6
1
2 3 4 5 6